Results 1 to 3 of 3

Thread: how can make the widget transparent

  1. #1
    Join Date
    Apr 2008
    Posts
    41
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default how can make the widget transparent

    how can make a widget like the http://doc.trolltech.com/qq/qq16-background.html
    do someone can help me???

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how can make the widget transparent

    You can try using QWidget::setPalette
    window.setPalette(QBrush(Qt::NoBrush));

    Hope this helps

  3. #3
    Join Date
    Mar 2008
    Posts
    27
    Thanks
    1
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: how can make the widget transparent

    I think it's easier to do something like:
    widget.setStyleSheet("background-color: transparent;");
    or for semi-transparency:
    widget.setStyleSheet("background-color: rgba(0, 0, 0, 50%);");

Similar Threads

  1. make a widget paint itself even thought it is not shown
    By momesana in forum Qt Programming
    Replies: 7
    Last Post: 28th April 2008, 11:57
  2. transparent background of the main widget
    By nagpalma in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2007, 17:52
  3. Compiling with Qmake/Make
    By VireX in forum Newbie
    Replies: 25
    Last Post: 22nd February 2007, 05:57
  4. Replies: 3
    Last Post: 19th October 2006, 22:13
  5. Transparent TextEdit or Widget
    By showhand in forum Qt Programming
    Replies: 8
    Last Post: 26th May 2006, 05:58

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.