Results 1 to 8 of 8

Thread: Using custom Q_PROPERTY with Stylesheet

Hybrid View

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

    Default Re: Using custom Q_PROPERTY with Stylesheet

    SABROG gave you the answer: you have to reaply the style sheet every time you change this property. So your approach doesn't seem to be the best. Without knowing exactely what you are doing, I would recomend you to use a custom item delegate where you can paint different backgrounds depending on the items "property". Or if you add widgets, use the widgets paint methode.

  2. The following user says thank you to Lykurg for this useful post:

    hubbobubbo (22nd April 2010)

  3. #2
    Join Date
    Dec 2009
    Posts
    62
    Qt products
    Qt4
    Platforms
    Windows
    Thanks
    6

    Default Re: Using custom Q_PROPERTY with Stylesheet

    Ok thanks I will give up on that approach.

Similar Threads

  1. Usability of StyleSheet in Pure Custom Widget Plugin?
    By umituzun84 in forum Qt Programming
    Replies: 2
    Last Post: 5th March 2010, 14:22
  2. Why and when to use Q_PROPERTY
    By Vanir in forum Qt Programming
    Replies: 4
    Last Post: 22nd November 2007, 09:25
  3. How to Use Q_PROPERTY
    By mitesh_modi in forum Qt Programming
    Replies: 7
    Last Post: 20th June 2006, 14:49
  4. enlighten me on the use of Q_PROPERTY!!
    By nupul in forum Newbie
    Replies: 4
    Last Post: 3rd April 2006, 10:02
  5. Pointers and Q_PROPERTY
    By andersin in forum Qt Programming
    Replies: 3
    Last Post: 1st March 2006, 14:05

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
  •  
Qt is a trademark of The Qt Company.