Hi

Some reason below code paints a menu with transparent background. So the check box and label next to it has no background.

Any ideas why ?


Qt Code:
  1. QMenu *menuOther = new QMenu(tr("&Other"), this);
  2.  
  3. QCheckBox *checkbox = new QCheckBox(tr("Test"), this);
  4. connect(checkbox, SIGNAL(toggled(bool)), parent, SLOT(button(bool)));
  5.  
  6. QWidgetAction *action = new QWidgetAction(menuOther);
  7. action->setDefaultWidget(checkbox);
  8.  
  9. menuOther->addAction(action);
  10. addMenu(menuOther);
To copy to clipboard, switch view to plain text mode 

$ uname -a
Darwin Mac-mini.local 10.8.0 Darwin Kernel Version 10.8.0: Tue Jun 7 16:33:36 PDT 2011; root:xnu-1504.15.3~1/RELEASE_I386 i386

Thanks for looking