You are not logged in.
Hi. A recent update seems to have caused my qt5 apps to stop respecting the Gtk theme. I usually set my gtk theme using lxappearance, and set Qt style using qtconfig-qt4 to use GTK+. As far as I can tell Qt4 apps look perfectly fine (e.g. VirtualBox manager uses qt4, does it?). Only qt5 apps are affected (e.g. Robomongo). It doesn't matter what theme I choose, qt5 apps always look like they use some plain light-grey default-looking theme.
I tried using qt5ct to set the style to gtk2, but it crashes as soon as I select gtk2 style. I Installed qt5-styleplugins from the AUR and set the environment variable to
QT_STYLE_OVERRIDE='GTK+'
That seemed to do nothing at all. Then I tried,
QT_STYLE_OVERRIDE='gtk2'
And that causes the following error when I try to run qt5 apps.
(robomongo:501): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplayManager'
(robomongo:501): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
(robomongo:501): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
(robomongo:501): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(robomongo:501): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(robomongo:501): GLib-GObject-WARNING **: invalid (NULL) pointer instance
(robomongo:501): GLib-GObject-CRITICAL **: g_signal_connect_data: assertion 'G_TYPE_CHECK_INSTANCE (instance)' failed
(robomongo:501): GLib-GObject-WARNING **: cannot register existing type 'GdkDisplay'
(robomongo:501): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
(robomongo:501): GLib-GObject-CRITICAL **: g_type_register_static: assertion 'parent_type > 0' failed
(robomongo:501): GLib-CRITICAL **: g_once_init_leave: assertion 'result != 0' failed
(robomongo:501): GLib-GObject-CRITICAL **: g_object_new: assertion 'G_TYPE_IS_OBJECT (object_type)' failed
Segmentation fault (core dumped)
Any direction on how to get qt5 apps to look a bit nicer (please excuse my vanity), would be great. I actually don't even care too much which theme I'm using, but I'd like it to be dark (e.g. a slightly tweaked Xfce-dusk has always been my go-to...I tried Vertex-Dark just now to see if there was any change, and it looks nice too.)
Last edited by Pacopag (2016-07-03 14:30:03)
Offline
Instead of anything like
QT_STYLE_OVERRIDE='gtk2'
you should put
export QT_QPA_PLATFORMTHEME=qt5ct
in your .bashrc.
And then you can match your gtk colours using qt5ct.
Last edited by fluxboxer (2016-07-03 13:41:01)
Offline
Thank you. That would be a decent solution, but qt5 is still not respecting the colour palette I created.
Offline
Actually, it does work now. It's not great that I'd have to tweak the palette any time I change theme, but considering that I'll likely never change theme, this is great. Thanks.
Offline
Have you tried qt5ct > style > Fusion (or QtCurve if you've installed qtcurve-qt5)?
Offline
Actually, it does work now. It's not great that I'd have to tweak the palette any time I change theme, but considering that I'll likely never change theme, this is great. Thanks.
I thouhgt the same, that is, you would use the same theme.
If you use different themes or customise it you can use some sed commands to apply it to qt5ct config. You can put the sed command in your keybinding utility.
Offline
It looks like Fusion is the default. Is there some kind of package that would just provide a set of additional qt5 themes? Rather than fiddle with colour palette, maybe there is just some out-of-the-box dark theme for qt5 that looks somewhat similar to xfce-dusk.
Offline
Hmmm. Not sure what you did to me (likely the export QT_QPA_PLATFORMTHEME=qt5ct was enough). But now it seems that I can just set the style to gtk2 in qt5ct, and EVERYTHING looks seamless.
Thanks so much for your help.
Offline
You can try kvantum from AUR. You can use it with or without qt5ct as it has its own config manager, Kvantum Manager. It doesn't have KDE dependencies and it has many presets most of which is installed by the package itself and some others can be downloaded from KDE-look-org. Half or most of those presets are dark.
If you use it without qt5ct, instead of
export QT_QPA_PLATFORMTHEME=qt5ct
you should put
export QT_STYLE_OVERRIDE=kvantum
in your .bashrc.
Last edited by fluxboxer (2016-07-03 14:37:50)
Offline
You're welcome. Glad to help.
Offline