Results 1 to 2 of 2

Thread: QT CSS style

  1. #1
    Join Date
    Dec 2010
    Posts
    9
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Unix/X11 Maemo/MeeGo

    Default QT CSS style

    Hi All,

    I would like the users to be able to customize our applications by simply loading their own CSS files. How do we accomplish that? Can anybody give me a jumpstart?

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

    Default Re: QT CSS style

    Where is the problem?
    See QFile, QTextStream. and setTyleSheet().
    EDIT:
    And as wysota said in another post:
    There is a -stylesheet commandline parameter QApplication supports. You can also just load the file directly in your app and apply its contents as the stylesheet of the application object.
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

Similar Threads

  1. Do Qt Style Sheets support List-style-image?
    By daiheitan in forum Qt Programming
    Replies: 6
    Last Post: 12th March 2010, 01:41
  2. Problems with Gradient style used through Style sheet on ARM platform
    By puneet.narsapur in forum Qt for Embedded and Mobile
    Replies: 0
    Last Post: 25th January 2010, 12:48
  3. Replies: 7
    Last Post: 16th February 2009, 21:59
  4. Replies: 1
    Last Post: 7th February 2007, 00:12
  5. c++ style
    By mickey in forum General Programming
    Replies: 1
    Last Post: 2nd June 2006, 22:53

Tags for this Thread

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.