×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    113

    Make Qt not propagate Style sheets to its childs

    Hey guys,

    Is there any way to force a QWidget not propagate its style sheet to its children?

    I have a QWidget to which I made a setStyleSheet() to set a background-image. Problem is, every new QWidget I create using that one as parent ends up inheriting its style sheet properties.
    In order to fix this, I'm setting the background-image style sheet on *every* child QWidget to an empty url. There has to be a better way to do this.

    Best!
    Matias

  2. #2
    Regular Contributor
    Join Date
    Aug 2004
    Posts
    113

    Re: Make Qt not propagate Style sheets to its childs

    I just found the answer on this post.

    http://discussion.forum.nokia.com/fo...iving-me-crazy

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Make Qt not propagate Style sheets to its childs

    Documentation is worth to be read, you can do many things with styles
    http://doc.trolltech.com/4.6/stylesheet.html

Similar Threads

  1. do you know QDialog can use qt style?
    By Joyce An in forum Qt
    Replies: 3
    Last Post: 2010-06-24, 08:25
  2. Nokia Qt SDK Simulator and maemo5 Hildon style
    By petriku in forum [Archived] Qt SDKs and Tools
    Replies: 2
    Last Post: 2010-05-06, 21:09
  3. Style sheets are driving me crazy
    By danhicksbyron in forum Qt
    Replies: 7
    Last Post: 2010-01-24, 05:31
  4. Replies: 5
    Last Post: 2009-08-19, 08:31
  5. Desperate to find data sheets for MIDP
    By mrmaxosaurus in forum Mobile Java General
    Replies: 1
    Last Post: 2007-09-21, 07:05

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×