PDA

View Full Version : QLabel and QLineEdit setText() slow for many widgets?



budul
23rd November 2006, 10:35
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!

wysota
26th November 2006, 09:32
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?