Manjaro Difference between revisions of "Set all Qt app's to use GTK+ font & theme settings"

Difference between revisions of "Set all Qt app's to use GTK+ font & theme settings"

From Manjaro
imported>Handy
(Marked this version for translation)
 
(16 intermediate revisions by 8 users not shown)
Line 1: Line 1:
=Introduction=
<languages/>
__TOC__


For those of us that use [https://en.wikipedia.org/wiki/GTK%2B#Desktop_environments Desktop Environments] &/or [https://en.wikipedia.org/wiki/GTK%2B#Window_managers Window Managers] that use GTK+ , this fix is particularly helpful.
{{SectionTemplate|<translate><!--T:16--> Overview</translate>|
<translate>
<!--T:17-->
When using a [[Desktop_Environments|Desktop Environment]] or Window Manager that doesn't allow for the settings of QT themes, you can set QT to use your GTK themes instead.  
</translate>}}


For those such as myself that run 1080p or higher screen resolutions on largish monitors it can be quite a strain on the eyes when you can't control the size of the fonts that an application uses.
{{SectionTemplate|
<translate>
<!--T:18-->
Using qt5ct
</translate>
|2=
<translate>
<!--T:19-->
{{BoxInfo|note|In some Manjaro editions, this is already done for you by default}}


This fix makes your Qt app's use your GTK+ theme (colours & such) & your chosen font settings.


<br clear="all"/>
<!--T:20-->
Install {{ic|qt5ct}} using your favorite package manager or the command:
{{UserCmd|command=pamac install qt5ct}}


=How do you do it?=


1) Install '''qt5ct'''
<!--T:21-->
Set environment variables in {{ic|~/.profile}} by adding or updating the following lines:
{{File|file=~/.profile|content=<pre>export QT_QPA_PLATFORMTHEME="qt5ct"</pre>}}


2) Set environment variable in '''/etc/environment''' and add the following line:


'''export QT_QPA_PLATFORMTHEME=qt5ct'''
<!--T:22-->
Run the application '''QT5 Configuration Manager''' from the menu or run the command {{ic|qt5ct}}.


'''export QT_AUTO_SCREEN_SCALE_FACTOR=0'''


3) Restart the system
<!--T:23-->
Logout and login again to make the change effective
</translate>}}


4) Start '''qt5ct'''
{{SectionTemplate|
<translate><!--T:24--> [[File:Chmsee-icon.png|left|36px]]</translate>
<translate><!--T:15--> See Also</translate>|
<translate>
<!--T:25-->
* [https://wiki.archlinux.org/index.php/Uniform_Look_for_Qt_and_GTK_Applications Arch Wiki]
* Matching [https://archived.forum.manjaro.org/t/wiki-set-all-qt-apps-to-use-your-gtk-theme-font-settings/17654 Forum Topic]}}
</translate>


5) In the first tab '''Appearance''' choose '''Standard Dialogs: default''' (some people get crashes if they choose GTK3)
[[Category:Contents Page{{#translation:}}]]
 
Because we used /etc/environment to set the environment variables back in step 2), after you reboot, both the user & root accounts will be able to benefit from these changes.
 
(If you find that certain widget styles are missing, you can see if qt5-styleplugins brings a fix for you.)
 
<br clear="all"/>
 
=Links=
 
This ArchWiki page goes into far more detail:
 
Uniform look for Qt and GTK applications [https://wiki.archlinux.org/index.php/Uniform_Look_for_Qt_and_GTK_Applications]
 
<br clear="all"/>
=Support=
 
Following is a link to this page's forum counterpart where you
can post any related feedback: [https://forum.manjaro.org/t/wiki-set-all-qt-apps-to-use-your-gtk-theme-font-settings/17654]
 
<br clear="all"/>
[[Category:Contents Page]]
 
<hr>
 
21-Aug-2016: removed QT_STYLE_OVERRIDE mention, as qt5ct 0.25+ don't accept this anymore
29-July-2016: Updated method

Latest revision as of 18:10, 6 April 2022

Other languages:
English • ‎Türkçe • ‎español • ‎русский • ‎فارسی

Overview

When using a Desktop Environment or Window Manager that doesn't allow for the settings of QT themes, you can set QT to use your GTK themes instead.

Using qt5ct

note
In some Manjaro editions, this is already done for you by default


Install qt5ct using your favorite package manager or the command:

user $ pamac install qt5ct COPY TO CLIPBOARD


Set environment variables in ~/.profile by adding or updating the following lines:

~/.profile
export QT_QPA_PLATFORMTHEME="qt5ct"


Run the application QT5 Configuration Manager from the menu or run the command qt5ct.


Logout and login again to make the change effective

Chmsee-icon.png
See Also

Cookies help us deliver our services. By using our services, you agree to our use of cookies.