Results 1 to 2 of 2

Thread: Qt style sheet performance

  1. #1
    Join Date
    Jul 2012
    Posts
    20
    Thanks
    8
    Thanked 3 Times in 3 Posts
    Qt products
    Qt4

    Default Qt style sheet performance

    I have an GUI form application, develop on open suse and using QSS.
    I put all stylesheet code into only one .qss file called: main.qss and load it into qApp.
    Qt Code:
    1. qApp->setStyleSheet(s);
    To copy to clipboard, switch view to plain text mode 
    Problem is: perfomance really bad.
    If I don't use stylesheet, everything goes fine but after I setStyleSheet, application run very slow.
    How can I fix this ?

  2. #2
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: Qt style sheet performance

    You can fix it in not using style sheets. This feature was never optimized and one should avoid it. Better customize QStyle or do custom painting inside the widgets.

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

    vhptt (14th August 2012)

Similar Threads

  1. Style sheet documentation
    By waynew in forum Newbie
    Replies: 2
    Last Post: 19th July 2010, 11:51
  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. Style Sheet on QWizard
    By desch in forum Qt Programming
    Replies: 2
    Last Post: 6th December 2007, 17:12
  4. QToolButton and Style sheet
    By desch in forum Qt Programming
    Replies: 8
    Last Post: 1st December 2007, 08:38
  5. How to use style sheet
    By safknw in forum Qt Programming
    Replies: 1
    Last Post: 20th November 2006, 13:05

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.