Results 1 to 2 of 2

Thread: QApplication::setStyleSheet()

  1. #1
    Join Date
    Mar 2007
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QApplication::setStyleSheet()

    I was trying to customize GUI made in Qt Designer by calling QApplication::setStyleSheet() and got one strange feature: when I set in StyleSheet even one property for some widget, for example QLabel{background-color : red}, other properties of this widget that I have set for this widget in Designer (like font, alignment, etc...) are reset to defauls or to these of widget`s parent. If anybody could tell is this a normal behaviour or a bug, or maybe I do something wrong?

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default Re: QApplication::setStyleSheet()

    I am not sure about this, but I think you can't mix the two.
    I think you should either use the properties from designer, or make these changes in the styles heet (the changes to made in the propertied through designer)

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.