Results 1 to 2 of 2

Thread: QLabel and QLineEdit setText() slow for many widgets?

  1. #1
    Join Date
    Nov 2006
    Posts
    9
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default QLabel and QLineEdit setText() slow for many widgets?

    Hi guys,
    i've got performance problem when updating cca 90 custom widgets just with text. 3 QLabels and 1 QLineEdit for each. It worked fine with 4.0, but now in 4.2 i can see in profiler that setText() is the third most expensive call after msleep and SqlQuery. If i remove code for text updates preformance is back. Scenario is that if user press key down or up i have to update these labels according to display text in right position. Now i'm receiving noticeable lags in update. Probably i should draw all the labels in paintEvent by myself... This can be done for QLabel, but not for QLineEdit, though. Did i miss something in changelog of 4.2? Could it be some layout problem (e.g. updating geometry - resize)? Windoze is main target. :-|
    Thanks for any hint!

  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: QLabel and QLineEdit setText() slow for many widgets?

    You may check Trolltech task-tracker to see if anyone reported such a problem, as this seems to be a bug if it worked correctly in 4.0. BTW. have you tried 4.1?

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.