3

I just got the upgrade to QGIS 3.4 from the ubuntugis-unstable PPA. One thing that immediately stands in this version is that it ignores the DE theme, instead yielding an unhealthy white-based theme. In the figure below you can compare it with GEdit, an application that automatically integrates with the DE.

enter image description here

I have been using QGIS for more than a decade and this is the first version that does not integrate with the DE. I have gone through the Settings menus and could not find any option to activate integration with the DE. How can it be done?

Update: as requested by Erik Friesen, where is the output of qt5ct:

$ qt5ct
Configuration path: "/home/user/.config/qt5ct"
Shared QSS paths: ("/home/user/.local/share/qt5ct/qss", "/usr/share/i3/qt5ct/qss", "/usr/local/share/qt5ct/qss", "/usr/share/qt5ct/qss", "/var/lib/snapd/desktop/qt5ct/qss")
Shared color scheme paths: ("/home/user/.local/share/qt5ct/colors", "/usr/share/i3/qt5ct/colors", "/usr/local/share/qt5ct/colors", "/usr/share/qt5ct/colors", "/var/lib/snapd/desktop/qt5ct/colors")

And the main settings in qt-config:

enter image description here

3
  • 2
    Sorry but can you define what a "DE theme" is for those of us who don't know?
    – Joseph
    Commented Mar 15, 2019 at 13:30
  • This seems like a bug, therefore you should make a bug report on the appropriate site. Moreover, the download source you linked to explicitly refers to this as an "unstable release."
    – csk
    Commented Mar 15, 2019 at 15:55
  • @csk QGis 3.4 is a long term support (LTS) release. Commented Mar 15, 2019 at 16:05

3 Answers 3

4

I didn't find the OS integration, but changing style is possible in QGIS since 2015 if i'm correct, thanks to Nathan Woodrow

Screenshot from QGIS 2.x below

QGIS 2.x night theme

https://nathanw.net/2015/08/29/ui-theme-support-now-core-in-qgis/

Screenshot from QGIS 3.X

enter image description here

In QGIS 3, you can also use the Load QSS - UI Theme extension:

extension screenshot

there's a dark theme

Example

2
  • The UI theme does not function in QGis 3.4. Still have to check the plug-in you suggest, however, none of this answers my question. Commented Mar 15, 2019 at 14:41
  • You're right, it doesn't answer directly to your question, but tries to solve your problem ("yielding an unhealthy white-based theme. ") What you see is a screenshot from my computer with QGIS 3.4 and the night theme so i would suggest the problem is not homogeneous.
    – gisnside
    Commented Mar 18, 2019 at 7:03
3

QGIS automatically uses the DE color scheme on both of my machines running Plasma/kwin when UI Theme is set to Default. This happens because Plasma is built on QT5.

It looks like you're running i3 as your WM (I love that WM!), so you'll probably need to set your QT theme (specifically QT5) to match your DE theme. You can either configure that manually, or set it using one of several tools (or even an environment variable).

When I used to run i3, I set the configs manually (because running i3 just puts you in that mindset). But I have heard good things about Kvantum (mentioned in the second link below).

These ArchWiki entries provide a wealth of information on the subject. You don't need to be running Arch to make use of the info (I run Ubuntu and make heavy use of the ArchWiki).

QT - Appearance

Uniform Look for QT and GTK Applications

Edited to conform to answer standards. moved clarification request to comment.

2
  • I am using i3 on Ubuntu 18.04. Both the QT and GTK themes are configured correctly. QGis 3.4 does not integrate with the DE, be it on i3 or any other DE I have tried it with: Unity, Gnome, Mate. Commented May 29, 2019 at 14:46
  • Here is QGIS using the custom color scheme from my DE. QGIS using custom color scheme ( i.sstatic.net/0EOPq.jpg ). Which style is selected in your QGIS settings? It's probably GTK+ or Fusion, but it would be good to know for sure. Can you post screenshots or gists of your GTK2, GTK3, and QT5 appearance configurations? Contents of qt5ct would be especially helpful. Commented Jun 5, 2019 at 15:17
1

I have successfully integrated Qt's theme (the one QGIS uses) with GTK's theme on both Ubuntu 18.04 + i3wm and Arch + bspwm (and QGIS versions 3.10 and 3.12). I assume this solution works for most distro + DE/WM combinations on Linux and for most (if not all) versions of QGIS above 3.


Here are the steps described for Arch and Ubuntu. Installation on other distros depends on the package manager.

First thing I did was to install qt5ct:

sudo apt install qt5ct  # Ubuntu
sudo pacman -S qt5ct    # Arch

Then, I installed qt5-style-plugins:

sudo apt install qt5-style-plugins  # Ubuntu
yay -S qt5-styleplugins             # Arch

Note that in Arch you need yay because qt5-styleplugins is in the Arch User Repository (AUR).

For qt5ct to work properly, the following environment variable has to be set:

QT_QPA_PLATFORMTHEME=qt5ct

I just edited the /etc/environment file and added that line. Note that logging out is required for changes to this file to be recognized.

Then, in qt5ct I just selected the style to match gtk2.

enter image description here

Finally, in QGIS settings new styles were automatically added so I simply selected gtk2 as well and restarted QGIS for the changes to be applied.

enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.