PDA

View Full Version : Problems when styling QMenu with Qt Stylesheet



NoRulez
14th May 2011, 15:34
Hi @all,

How can I use the default checkboxes in a styled QMenu?
I saw the following in the docmentation


QMenu::indicator:non-exclusive:unchecked {
image: url(:/images/checkbox_unchecked.png);
}

QMenu::indicator:non-exclusive:unchecked:selected {
image: url(:/images/checkbox_unchecked_hover.png);
}

QMenu::indicator:non-exclusive:checked {
image: url(:/images/checkbox_checked.png);
}

QMenu::indicator:non-exclusive:checked:selected {
image: url(:/images/checkbox_checked_hover.png);
}


If I doesn't add these lines and I have an QActionGroup defined, then the checked elements have a gray background.

:Edit: The problem only occurs if an icon is set for the menu item.

Best Regards
NoRulez