Upgrade from Qt 5.7 to 5.10 results in slower UI
-
I've installed Qt 5.10 alongside 5.7, and when compiling the same project I get a very weird side-effect, my user interface is extremely slow (sometimes takes few seconds for a button push to process). I've looked at the cpu measurements, it doesn't look like it's working harder. Has anybody encountered such issue? Any directions to solving it / understanding the cause? Using ubuntu 16.04, with GCC 7.2 for both setups.
Run it with strace
looks like there is something different with the mouse handling, I think. While the 5.7 version finds this file open("/usr/share/icons/default/index.theme", O_RDONLY) = 11The 5.10 version is looking for it in another location, and fails. Later, it finds another file for it. open("/home/innereye/.icons/DMZ-White/index.theme", O_RDONLY) = -1 ENOENT (No such file or directory) open("/usr/share/icons/DMZ-White/cursors/xterm", O_RDONLY) = 19
-
Hi,
Does it also happen with a minimal application ?
-
No. And your question lead me to checking all the widgets in my app, only my main screen is acting weird. Other are ok.
-
@Jonathan-Levanon
I use Qt 5.7 under Ubuntu 17.04. Next year I will move to 18.04, with whatever the Ubuntu release package version of Qt will be. So please let us know when you discover what on your main page is causing the issue, as it might be relevant. Thanks. -
Did some more research on it. Seems like it is caused by 4 widgets (A checkbox, combobox, and 2 widgets containing a line edit with buttons interacting with it) that are added to the main window layout. The common ground between these widgets are the fact that they are connected to slots that updates something on the main widget (hide/show calls for other widgets on that screen or changing text). If I remove them from the layout, it's working fine. But of course, I can't do that. Any thoughts?
-
A wild thought: check if it helps if you turn Qt Accessibility on or off. Maybe it has some mysterious influence here.
-
Thanks. Tried QAccessible::setActive(true), and QAccessible::setActive(false), before and after creating the QApplication, didn't help.
-
@Jonathan-Levanon said in Upgrade from Qt 5.7 to 5.10 results in slower UI:
Any thoughts?
Not at the moment... but I'm wondering if you can create a smaller example that reproduces this problem? That might help us find a fix.
-
Thank for all the comments so far. While building a smaller example, I've noticed that if it remove the background image from my main screen, the problem goes away. This is how I set it -
QPalette palette;
palette.setBrush(this->backgroundRole(), QBrush(QImage("/path/to/img.jpg").scaled(1870, 1020)));
this->setPalette(palette);Any thoughts? Any way to workaround it? Tried using various CSS solutions but none of them gets stretched and all of them override subwidgets...
-
If anybody cares - I change my main widget to a QFrame, and then used
setStyleSheet("QFrame {background-image: url(/path/to/img.bmp);}");
This works ok.
-
@Jonathan-Levanon said in Upgrade from Qt 5.7 to 5.10 results in slower UI:
If anybody cares - I change my main widget to a QFrame, and then used
Yes, we do - thanks for your feedback :)
So please mark this thread as solved now, so others know a solution has been found.