PDA

View Full Version : Mac OS: How to make pop-up menu background transparent



montylee
15th January 2013, 12:19
I have same code which works fine on Windows and Linux but on Mac OS, the pop-up menu has a grey background and is not clipped properly:
8585

For implementing this, i am subclassing QMenu, creating a custom QPainterPath, drawing it inside paintEvent using painter.drawPath and also using setMask().

Is this an issue with Qt? Any solution to this?

Note: In this link, please refer QGroupBox and QTabWidget screen shots, i can see the grey background as part of the widget.
http://doc.qt.digia.com/main-snapshot/gallery-macintosh.html

montylee
16th January 2013, 13:14
Anyone? Using setMask(), i am able to mask out the background on all platforms except Mac.
Also, if i set background color though style sheet, the background shows up as black

zgulser
16th January 2013, 13:37
You may try to set another widget's backgorund as transparent to see whether the issue is particular to pop-up menus or not.

montylee
17th January 2013, 09:49
I just replaced the custom base class from QMenu to QWidget and the masking works properly, so apparently this issue is only coming with QMenu.
Is this a bug? Should i file a bug report?

Any ideas how to fix this issue?