Results 1 to 2 of 2

Thread: QMenu stylesheet and alpha coloring

  1. #1
    Join Date
    May 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QMenu stylesheet and alpha coloring

    hello all,

    I have a QMenu, now in my stylesheet iv tryed:
    Qt Code:
    1. {
    2. background: rgba(0, 0, 0, 120);
    3. }
    To copy to clipboard, switch view to plain text mode 
    Now i was hoping it would give a semi-transparent background on the drop down menu, so you could half see the applications qwidget below it.

    However what the above does is makes the background without alpha, basiclly its just blank rather then a semi-transparent black.

    can oneone point me in the right direction on achiving this or tell me were im going wrong.

    thanks,
    Phil

  2. #2
    Join Date
    Mar 2010
    Posts
    9
    Thanks
    1
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: QMenu stylesheet and alpha coloring

    use this:

    QMenu * myMenu = new QMenu;
    myMenu->setWindowOpacity(0.8);

Similar Threads

  1. QMenu::Scroller StyleSheet
    By AmolShinde_8 in forum Qt Programming
    Replies: 3
    Last Post: 4th March 2010, 08:46
  2. Help with QMenu item stylesheet
    By Sufu in forum Qt Programming
    Replies: 11
    Last Post: 9th May 2009, 06:58
  3. Coloring a QTableview column
    By Potch in forum Qt Programming
    Replies: 2
    Last Post: 4th April 2009, 23:18
  4. Coloring of Radio Button
    By jogeshwarakundi in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 22nd July 2008, 15:05
  5. qcombobox back ground coloring
    By sreedhar in forum Qt Programming
    Replies: 1
    Last Post: 20th December 2006, 19:29

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.