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 ?
connect(checkbox, SIGNAL(toggled(bool)), parent, SLOT(button(bool)));
action->setDefaultWidget(checkbox);
menuOther->addAction(action);
addMenu(menuOther);
QMenu *menuOther = new QMenu(tr("&Other"), this);
QCheckBox *checkbox = new QCheckBox(tr("Test"), this);
connect(checkbox, SIGNAL(toggled(bool)), parent, SLOT(button(bool)));
QWidgetAction *action = new QWidgetAction(menuOther);
action->setDefaultWidget(checkbox);
menuOther->addAction(action);
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
Bookmarks