Results 1 to 4 of 4

Thread: Mac OS: How to make pop-up menu background transparent

  1. #1
    Join Date
    Oct 2007
    Location
    India
    Posts
    162
    Thanks
    20
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Mac OS: How to make pop-up menu background transparent

    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:
    screen.png

    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-snapsho...macintosh.html

  2. #2
    Join Date
    Oct 2007
    Location
    India
    Posts
    162
    Thanks
    20
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Mac OS: How to make pop-up menu background transparent

    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

  3. #3
    Join Date
    Dec 2008
    Location
    Istanbul, TURKEY
    Posts
    537
    Thanks
    14
    Thanked 13 Times in 13 Posts
    Qt products
    Qt4
    Platforms
    Windows Android

    Default Re: Mac OS: How to make pop-up menu background transparent

    You may try to set another widget's backgorund as transparent to see whether the issue is particular to pop-up menus or not.

  4. #4
    Join Date
    Oct 2007
    Location
    India
    Posts
    162
    Thanks
    20
    Thanked 6 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: Mac OS: How to make pop-up menu background transparent

    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?

Similar Threads

  1. Replies: 2
    Last Post: 22nd December 2010, 15:58
  2. transparent background
    By fruzzo in forum Qt Programming
    Replies: 13
    Last Post: 18th March 2008, 15:42
  3. Transparent background on QLabel on transparent QWidget
    By codeslicer in forum Qt Programming
    Replies: 1
    Last Post: 13th February 2008, 03:10
  4. Transparent background Style
    By Lele in forum Qt Programming
    Replies: 5
    Last Post: 17th July 2006, 13:02
  5. Why the background is not transparent?
    By SkripT in forum Qt Programming
    Replies: 4
    Last Post: 9th May 2006, 02:17

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.