Not able to see pushButton->setIcon(style.standardIcon(QStyle::SP_MessageBoxCritical))

332 Views Asked by At

I am using Qt4.8.6 on windows7, I am trying to set QStyle::SP_MessageBoxCritical Icon to the QPushButton as below

QPushButton* criticalButt = new QPushButton(this);
criticalButt->setIcon(style.standardIcon(QStyle::SP_MessageBoxCritical));

But I am not able to see any icon, but if I do

criticalButt->setIcon(style.standardIcon(QStyle::QStyle::SP_ArrowBack));

I am able to see the arrow back button.

Please let me know any one face this issue.

Thanks in advance :-)

0

There are 0 best solutions below