Results 1 to 2 of 2

Thread: Transparent QMenu in QMenuBar

  1. #1
    Join Date
    Feb 2015
    Posts
    17
    Qt products
    Qt5
    Platforms
    Unix/X11 Windows Android

    Default Transparent QMenu in QMenuBar

    Hi guys, how can i make a transparent QMenu in QMenuBar @ top of a app.
    I was try with a styleSheet, but without success.
    Thanks for help.


    menubarqt.jpg

  2. #2
    Join Date
    May 2012
    Location
    Bangalore, India
    Posts
    271
    Thanks
    29
    Thanked 50 Times in 47 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: Transparent QMenu in QMenuBar

    Do this in ctor of your QMenu class:-

    Qt Code:
    1. setStyleSheet("background:transparent;");
    2. setAttribute(Qt::WA_TranslucentBackground);
    3. setWindowFlags(Qt::FramelessWindowHint);
    To copy to clipboard, switch view to plain text mode 
    Heavy Metal Rules. For those about to rock, we salute you.
    HIT THANKS IF I HELPED.

Similar Threads

  1. Select first QMenu from QMenuBar using ALT key
    By AndreiTuicu in forum Qt Programming
    Replies: 1
    Last Post: 24th May 2014, 18:19
  2. Highlight the Qmenu/QmenuBar in Qt
    By rohitkk in forum Qt Programming
    Replies: 2
    Last Post: 30th April 2014, 11:37
  3. QMenuBar and QMenu colors
    By Raadush in forum Qt Programming
    Replies: 1
    Last Post: 29th May 2012, 11:19
  4. Replies: 2
    Last Post: 4th April 2012, 10:23
  5. QMenuBar and QMenu
    By thedoctor in forum Qt Programming
    Replies: 0
    Last Post: 21st December 2009, 21:01

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.