Results 1 to 2 of 2

Thread: Difference between QStyle and Style Sheet

  1. #1
    Join Date
    Oct 2008
    Location
    Beijing China
    Posts
    77
    Thanks
    21
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Question Difference between QStyle and Style Sheet

    regardless of ways to apply both of them, i wonder the difference(s) between them.

    is Style Sheet able to do everything that QStyle does? and vice versa?

  2. #2
    Join Date
    Oct 2006
    Location
    New Delhi, India
    Posts
    2,467
    Thanks
    8
    Thanked 334 Times in 317 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: Difference between QStyle and Style Sheet

    From the Qt docs...
    The QStyle class is an abstract base class that encapsulates the look and feel of a GUI. More...
    and..
    Style sheets are applied on top of the current widget style, meaning that your applications will still look native, but any style sheet constraints will be taken into consideration. Unlike palette fiddling, style sheets offer guarantees: If you set the background color of a QPushButton to be red, you can be assured that the button will have a red background in all styles, on all platforms.
    So basically it seems that QStyle does the all drawing, taking into consideration style sheets
    Hope I am right

  3. The following user says thank you to aamer4yu for this useful post:

    nifei (17th November 2008)

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.