Results 1 to 6 of 6

Thread: Style Sheets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #4
    Join Date
    May 2010
    Posts
    7
    Qt products
    Qt4

    Default Re: Style Sheets

    Here's the method provided inside the Qt Doc's for anyone interested.

    Qt Code:
    1. void MainWindow::loadStyleSheet(const QString &sheetName)
    2. {
    3. QFile file(":/" + sheetName.toLower() + ".qss");
    4. file.open(QFile::ReadOnly);
    5. QString styleSheet = QLatin1String(file.readAll());
    6.  
    7. setStyleSheet(styleSheet);
    8. }
    To copy to clipboard, switch view to plain text mode 


    Thanks again.
    Last edited by yakuzan; 28th May 2010 at 21:36.

Similar Threads

  1. QDockWidget-title
    By moowy in forum Qt Programming
    Replies: 18
    Last Post: 23rd April 2014, 20:13
  2. how to hide the title bar when a QDockWidget is docked?
    By oscar721 in forum Qt Programming
    Replies: 5
    Last Post: 23rd January 2014, 20:16
  3. Combined Title and Tab for QDockWidget
    By chaoticbob in forum Qt Programming
    Replies: 0
    Last Post: 25th May 2010, 19:16
  4. contextmenu in QDockWidget title
    By klipko in forum Newbie
    Replies: 4
    Last Post: 7th March 2008, 22:32
  5. No restore button in QDockWidget title bar
    By trskel in forum Qt Programming
    Replies: 1
    Last Post: 21st September 2007, 09:59

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.