Results 1 to 2 of 2

Thread: Style Sheets & Pros and Cons on Qt.

  1. #1
    Join Date
    Sep 2009
    Location
    Las Vegas, Nevada - USA
    Posts
    12
    Thanks
    2
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Question Style Sheets & Pros and Cons on Qt.

    I want to switch over to Qt because of the cross platform support. I am looking for pros and cons on Qt. I have been a Delphi programmer since Delphi 1, and written many custom components within Delphi for our products.

    I have played around with the Style Sheet for the QPushButton and gotten close to what we have, but not really.

    Q. When working with Style Sheets how do you save them as a resource so all the QPushButton would use the same style? Also what if you have two or three styles of QPushButton on a page.

    I do apologize for the lack of understanding in this envorinment.

  2. #2
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,359
    Thanks
    3
    Thanked 5,015 Times in 4,792 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Wiki edits
    10

    Default Re: Style Sheets & Pros and Cons on Qt.

    You don't have to save the stylesheet in a dedicated resource. It's just a string - you can load it from anywhere you want or set on the application permanently. If you want all widgets in the application make use of the stylesheet, apply it on the application object (QApplication::setStyleSheet()). If you want different styles for some of the buttons, use one of selectors available for stylesheets to choose appropriate widgets.

    The selectors are described here: Selector Types.
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


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.