Results 1 to 3 of 3

Thread: stylesheet help nedded

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    517
    Thanks
    21
    Thanked 66 Times in 62 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: stylesheet help nedded

    there is also another way to do this.. use an external file and put all stylesheet code there..then load that file for loading the stylesheet of WHOLE application all at once..that way ur stylesheet code for pushbutton and other widgets wont be scattered around the whole project..and u wont have to make any changes in the code itself when u want a change to the look of the UI..all u'll have to do is change that external file..u can do it like this:

    Qt Code:
    1. QString strCurTheme = "styles.qss";
    2. QFile file(strCurTheme );
    3. file.open(QFile::ReadOnly);
    4. application.setStyleSheet(file.readAll());
    To copy to clipboard, switch view to plain text mode 

  2. The following 2 users say thank you to talk2amulya for this useful post:

    aj2903 (14th February 2009), thanyaj (11th November 2010)

Similar Threads

  1. Replies: 7
    Last Post: 12th January 2011, 22:01
  2. StyleSheet syntax checking
    By MarkoSan in forum Qt Programming
    Replies: 5
    Last Post: 30th June 2008, 10:09
  3. StyleSheet components using Qt designer
    By Kostanev in forum Qt Tools
    Replies: 1
    Last Post: 21st April 2008, 08:28
  4. how to apply stylesheet to qtopia application using qss file
    By namita in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 31st March 2008, 07:04
  5. Replies: 8
    Last Post: 17th March 2008, 14:04

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.