Results 1 to 4 of 4

Thread: Making a chld widget semi transparent:works ony for full transparency.

  1. #1
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Making a chld widget semi transparent:works ony for full transparency.

    I am trying to make a child widget a semi-transparent, so that an image set for the parent widget,can be shine through. I mean the parent's image should be dull in the area,where a child occupied.

    I have tried using the setStylesheet("background:transparent"); which makes a widget complete transparent. how do i make a child semi transparent on parent widget. Provide me some refrence if possible.

    I have gone thorough this http://doc.trolltech.com/qq/qq16-background.html link, but i dont get what to use and which will be the easy way? i am using Qt-4.6.2.

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Making a chld widget semi transparent:works ony for full transparency.

    Then set a semitransparent color. Or what exactly do you want?

  3. #3
    Join Date
    May 2010
    Posts
    100
    Thanks
    1
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    Unix/X11

    Default Re: Making a chld widget semi transparent:works ony for full transparency.

    Thanks.

    i have one LCD of 480*800, i have kept an background-image, using setStylesheet on its widget of the LCD Size. Now, i want to put a Child widget. And it's geometry say (100,100,200,200). i should be able to see the parent's semi transparent background-image from this child widget.
    Is there Any other way of setting background image on to widget?

    I have tried to setStyleSheet("background:transparent"); ,but this shows complete transparent. i want to see slightly dull image . I mean semitransparent child.

    And what value semitransparent color poses?

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Making a chld widget semi transparent:works ony for full transparency.

    css Code:
    1. background-color: rgba(255,255,255,60);
    To copy to clipboard, switch view to plain text mode 
    is a bit of white but one should see the image through.

Similar Threads

  1. Semi-transparency through parents' widgets
    By Anatoly in forum Qt Programming
    Replies: 2
    Last Post: 21st December 2009, 09:23
  2. Can QDockWidget be semi-transparent?
    By PolyVox in forum Qt Programming
    Replies: 3
    Last Post: 17th March 2009, 20:09
  3. Non-transparent QWidget on semi-transparent parent
    By EuroElessar in forum Qt Programming
    Replies: 0
    Last Post: 29th August 2008, 16:20
  4. Semi-Transparent Background on Widget?
    By JimDaniel in forum Qt Programming
    Replies: 3
    Last Post: 16th January 2008, 18:19
  5. Semi transparent QDialog
    By cs_raja in forum Qt Programming
    Replies: 3
    Last Post: 23rd May 2007, 10:14

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.