#include "bug_reproduction.h" #include #include MyMainWindow::MyMainWindow(const QString & stylesheet) { qApp->setStyleSheet(stylesheet); QMenu * menu1 = menuBar()->addMenu("menu1"); QAction * act1 = new QAction("item1", this); act1->setCheckable(true); QAction * act2 = new QAction("item2", this); act2->setCheckable(true); QActionGroup * group = new QActionGroup(this); group->addAction(act1); group->addAction(act2); act1->setChecked(true); menu1->addAction(act1); menu1->addAction(act2); } int main(int argc, char ** argv) { QApplication app(argc, argv); QString stylesheet("QMenu::indicator:exclusive:checked {image: url(checked.png);}"); MyMainWindow mmw(stylesheet); mmw.show(); return app.exec(); }