Hello. I've noticed a strange behavior of exclusive menu items. Take a look at the following sample:

Qt Code:
  1. #include <QApplication>
  2. #include <QtGui>
  3. #include <QActionGroup>
  4.  
  5. int main(int argc, char* argv[])
  6. {
  7. QApplication app(argc, argv);
  8.  
  9. QMenu menu;
  10. QObject::connect(&menu, SIGNAL(aboutToHide()), &app, SLOT(quit()));
  11.  
  12. QActionGroup actionGroup(&menu);
  13. actionGroup.setExclusive(true);
  14.  
  15. for (int i = 0; i < 3; ++i)
  16. {
  17. QAction *action = actionGroup.addAction(QString("Action %1").arg(i));
  18. action->setCheckable(true);
  19. action->setChecked(i == 1);
  20. }
  21.  
  22. menu.addActions(actionGroup.actions());
  23. menu.show();
  24.  
  25. return app.exec();
  26. }
To copy to clipboard, switch view to plain text mode 

This works as expected and produces the following menu with exclusive item selection list:
Clipboard01.png

Now I want to apply a very basic stylesheet to the menu, just to change a color. Here goes the qss script:
Qt Code:
  1. {
  2. background-color: grey;
  3. color: #000000;
  4. }
To copy to clipboard, switch view to plain text mode 

Now apply the stylesheet (only 3 lines of code added):
Qt Code:
  1. #include <QApplication>
  2. #include <QtGui>
  3. #include <QActionGroup>
  4.  
  5. int main(int argc, char* argv[])
  6. {
  7. QApplication app(argc, argv);
  8.  
  9. // apply stylesheet
  10. QFile qssFile(":/stylesheet/style.qss");
  11. qssFile.open(QIODevice::ReadOnly);
  12. app.setStyleSheet(qssFile.readAll());
  13.  
  14. QMenu menu;
  15. QObject::connect(&menu, SIGNAL(aboutToHide()), &app, SLOT(quit()));
  16.  
  17. QActionGroup actionGroup(&menu);
  18. actionGroup.setExclusive(true);
  19.  
  20. for (int i = 0; i < 3; ++i)
  21. {
  22. QAction *action = actionGroup.addAction(QString("Action %1").arg(i));
  23. action->setCheckable(true);
  24. action->setChecked(i == 1);
  25. }
  26.  
  27. menu.addActions(actionGroup.actions());
  28. menu.show();
  29.  
  30. return app.exec();
  31. }
To copy to clipboard, switch view to plain text mode 

Exclusive indicators are changed and look like non-exclusive:
Clipboard02.png

Am I doing something wrong? How can this behavior be fixed?