1
0
mirror of https://github.com/tiyn/wiki.git synced 2025-04-09 01:57:46 +02:00
wiki/wiki/linux/qt.md

1.9 KiB

Qt

Qt is an application and widget toolkit.

Setup

On most linux distributions different Qt versions are installed as a dependency of various programs that use graphical user interfaces.

Configuration

The configuration can easily be achieved by using the programs qt5ct or qt6ct the latter working with the current version of Qt. qt5ct is officially archived and qt6ct is the recommended program to use and will mainly be discussed in this article. These programs can sometimes be found as package of the same name. Afterwards qt6ct can be run to get a graphical user interface to set the theme and icons of Qt applications. This will create or edit a configuration file located at ~/.config/qt6ct/qt6ct.conf. To make this config apply for all Qt applications the following line needs to be inserted into the ~/.profile file.

export QT_QPA_PLATFORMTHEME="qt6ct"

Afterwards qt6ct can be used to enable the dark mode or change other configurations.

Achieving a System-Wide Uniform Look

GTK is the other big widget toolkit in use. An easy way to achieve a uniform look of GTK and Qt is the usage of the Adwaita theme in both toolkits. This is also described in the official Arch wiki.

A simple way to achieve this in Qt is the installation of adwaita-qt6 which is also available as an AUR package. After the installation it can be selected by qt6ct as described in the configuration section.

For setting the same theme for GTK refer to the corresponding entry.