PDA

View Full Version : Styling the tear-off handle of a QMenu?



dictoon
29th July 2010, 12:42
Is it actually possible to customize the look of the "tear-off" handle of a QMenu with stylesheets? The documentation (http://doc.qt.nokia.com/4.6/stylesheet-reference.html) seems to indicate it's possible: "The tear-off is styled using the ::tear-off" (on styling QMenu).

Here's what I've tried:



QMenu::tear-off
{
background-color: green;
color: red;
border: 10px solid yellow;
}


However this has no effect whatsoever, neither on Windows (Vista) nor on Mac OS X (10.4). I also tried "QMenu::tear-off::item".

I'm using Qt 4.6.2, latest stable.

Cheers,
Franz

dictoon
30th July 2010, 18:17
I opened a bug for this issue: http://bugreports.qt.nokia.com/browse/QTBUG-12553.

Cheers,
Franz

dictoon
5th August 2010, 17:58
It appears that the documentation was wrong, the correct name of the subcontrol is "tearoff", not "tear-off".

For more details, see this bug: http://bugreports.qt.nokia.com/browse/QTBUG-12553.

Cheers,
Franz