Ubuntu / Linux news and application reviews.

Unlike Qt4, Qt5 doesn't come with a configuration tool to allow setting the icon theme, fonts or the style and instead, it tries to use the settings from the running desktop environment.

This works well for KDE and GNOME (as well as Unity) but you may encounter issues under other desktop environments such as Xfce, Cinnamon, MATE and others (I'm not sure what Qt5 versions are affected by this, but it seems to be fixed in the latest Qt 5.5.1 according to THIS comment).

Here's an example (Audacious 3.7 using the Qt5 interface under Linux Mint 17.2 with Cinnamon):

Instead of "Open Files", "Add Files" and so on, Audacious should have icons. The app is also not using the GTK+ Qt5 style.

To force the Qt5 style or icon theme, you can use an application called Qt5ct (Qt5 Configuration Tool). Besides the style and icons, Qt5ct can also be used to change various other Qt5 settings, such as fonts, add custom style sheets and tweak other interface settings such as the double click interval, enable icons in menus and dialog buttons and more:

Here's another Audacious 3.7 Qt5 interface screenshot taken under Linux Mint 17.2 Cinnamon, after using Qt5 Configuration Tool to set the icon theme to Mint-X and the style to GTK+:

To make it easier to install Qt5ct for Ubuntu and Linux Mint (and derivatives) users, I've uploaded the latest version in the main WebUpd8 PPA. I didn't package the application and instead, I've used the packaging from THIS PPA. I decided rebuild the packages because that PPA comes with an older version and the packages are only tested for Ubuntu 14.04 (and in my test, the Ubuntu 15.04 and 15.10 packages weren't installable). So the packaging credits go to "hda_launchpad".

Install and configure Qt5 Configuration Tool in Ubuntu or Linux Mint

1. To add the main WebUpd8 PPA and install the latest Qt5 Configuration Tool (Qt5ct) in Ubuntu 16.10, 16.04, 15.10, 15.04 or 14.04 / Linux Mint 18 or 17.x and derivatives, use the following commands:
sudo add-apt-repository ppa:nilarimogard/webupd8
sudo apt-get update
sudo apt-get install qt5ct
If you don't want to add the PPA, you can download the DEB from HERE (but you won't receive any updates unless you add the PPA).

Arch Linux users can install Qt5ct from the Community repository. For other Linux distributions, you can download Qt5ct from SourceForge.

2. Once installed, there's one more step you need to follow or else the settings you apply using Qt5ct won't be applied - you need to open ~/.profile with a text editor (".profile" is a hidden file in your home directory so use CTRL + H to show hidden files) and at the bottom of this file, add the following line:
Then, save the file, log out and after you login you can use Qt5 Configuration Tool to change the Qt5 style, icon theme and so on.

You'll need to restart any Qt5 applications that were running to see the changes.

If later on you want to revert the changes, simply remove the "export QT_QPA_PLATFORMTHEME=qt5ct" line from your ~/.profile file and restart your session (logout).

Important: in some desktop environments / Linux distributions, the QT_QPA_PLATFORMTHEME (or QT_STYLE_OVERRIDE) environment variable might already be set. For instance, Xubuntu sets QT_STYLE_OVERRIDE in /etc/X11/Xsession.d/56xubuntu-session (so you'll need to comment it out to be able to use Qt5ct). LXDE hardcodes this so the only way around it is to compile the code yourself - see HERE.

  • I've tried adding this in Lubuntu 15.10 (uses LXDE) to ~/.profile, ~/.xsessionrc as well as /etc/environment and it didn't work for some reason (but exporting it using a terminal and then running a Qt5 app works, so the Qt5ct application works properly). If you find a way to get this to work in Lubuntu, let us know in the comments!
  • Using Qt5ct breaks the `Albert` user interface (probably because Albert tries to use the theme specified by Qt5ct).