8

I noticed whenever I force qt applications to use any GTK theme on Ubuntu 19.10 by adding the line export QT_QPA_PLATFORMTHEME=gtk2 to .profile, the startup time goes from 1-3 seconds to 20+ seconds for vlc and qbittorrent. Why is this and is there anything I can do?

I have ran sudo apt install qt5ct and sudo apt install qt5-style-plugins

d-air1
  • 83
  • Could you try sudo gdk-pixbuf-query-loaders --update-cache if it helps? – user.dz Nov 01 '19 at 00:44
  • 1
    When I used the QT5 Settings tool, I didn't see any delays after selecting the gtk2 style. – ajgringo619 Nov 01 '19 at 01:09
  • Even using qt5 settings tool I get the same result. – d-air1 Nov 01 '19 at 01:18
  • What pacakge is gdk-pixbuf-query-loaders? Becuase I don't seem to have it installed. – d-air1 Nov 01 '19 at 01:19
  • I tested it with vlc and qbittorrent and it is like this with all themes. – d-air1 Nov 01 '19 at 02:25
  • @d-air1 And when you reply in comments, please ping the person you're replying to by using @ followed by the first letter(s) of the user's name. Otherwise, they may not be notified that you've responded. Also, please add any additional information by editing your question as well. – DK Bose Nov 01 '19 at 02:47
  • 1
    I tested dolphin, featherpad, gwenview, kate, konsole, and vlc after setting gtk2 in qt5ct's GUI and setting Adwaita-dark in Tweaks. No lag. I didn't use the .profile route. OS: Ubuntu 19.10. All packages installed using sudo apt install. – DK Bose Nov 01 '19 at 03:47
  • @DKBose also thanks for telling me how to ping people. – d-air1 Nov 02 '19 at 03:28
  • @DKBose I have installed qt5ct and qt5-style-plugins and have tried with adwaita-dark to no avail. – d-air1 Nov 02 '19 at 04:32
  • But does the application use the gtk theme when it eventually loads? – DK Bose Nov 02 '19 at 04:33
  • If the qt applications do use the desired theme, I can't explain the lag you see. Sorry! – DK Bose Nov 02 '19 at 04:34
  • @DKBose Yes you are correct it does use the theme when the application eventually loads. – d-air1 Nov 02 '19 at 04:45
  • 1
    @DKBose and it is alright It seems I can change the color palette withing qt5settings gui to something close enough and it will load that just fine. – d-air1 Nov 02 '19 at 04:47

2 Answers2

4

I did some testing as I had some machines with the problem and others without it. I have narrowed it down to this:

sudo apt install appmenu-registrar vala-panel-appmenu-common

With those both installed (and the recommends from appmenu-registrar), after reboot your qt5 apps should launch without delay, even with QT_QPA_PLATFORMTHEME=gtk2 in your ~/.profile or /etc/environment So GTK theme looks good plus no delay in launching qt apps!

rik-shaw
  • 854
  • 1
    sudo apt-get install appmenu-gtk2-module is sufficient, like described here: https://askubuntu.com/a/748186/79691 – DMT Nov 24 '20 at 15:14
  • 1
    @DMT Not for me, on mint 20.01 (based on ubuntu 20.04), appmenu-gtk2-module was not enough, and needed to install these too. – Luis de Arquer Jan 23 '21 at 19:08
0

On Ubuntu based Pop OS this same issue is occuring, but only on fresh 19.10 installs and not on 19.04 or 19.10 upgrades from 19.04. So if you had upgraded your system to 19.10 if the issue is not Pop OS specific then you likely won't experience the issue like those on fresh installs.