Results 1 to 3 of 3

Thread: Semi-transparency through parents' widgets

  1. #1
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Semi-transparency through parents' widgets

    Hi all,
    Can you help me make a widget transparent through parents' widgets. By that I mean making a widget transparent to the desktop (for example) while the parent widget is opaque.
    I've tried stuff like
    Qt Code:
    1. setStyleSheet("background-color: QColor(r,g,b,%);");
    2. setAttribute(Qt::WA_PaintOnScreen);
    3. setAttribute(Qt::WA_PaintUnclipped);
    To copy to clipboard, switch view to plain text mode 
    but had no luck.
    Thanks in advance!

  2. #2
    Join Date
    Dec 2007
    Posts
    628
    Thanks
    3
    Thanked 89 Times in 87 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Semi-transparency through parents' widgets

    Quote Originally Posted by Anatoly View Post
    Hi all,
    Can you help me make a widget transparent through parents' widgets. By that I mean making a widget transparent to the desktop (for example) while the parent widget is opaque.
    I've tried stuff like
    Qt Code:
    1. setStyleSheet("background-color: QColor(r,g,b,%);");
    2. setAttribute(Qt::WA_PaintOnScreen);
    3. setAttribute(Qt::WA_PaintUnclipped);
    To copy to clipboard, switch view to plain text mode 
    but had no luck.
    Thanks in advance!
    Check this out
    void setWindowOpacity ( qreal level )

  3. #3
    Join Date
    Dec 2009
    Posts
    2
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Semi-transparency through parents' widgets

    Quote Originally Posted by yogeshgokul View Post
    Yeah, but doesn't that make the whole window transparent, including titlebar etc.? I need only the one widget to be transparent, while keeping all other stuff opaque.

Similar Threads

  1. Replies: 7
    Last Post: 12th January 2011, 22: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.