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

From Manjaro Linux
Jump to: navigation, search
(Support)
(replacing restart with source command)
(7 intermediate revisions by 3 users not shown)
Line 1: Line 1:
 +
13-March-2018: Updated contents & method.
 +
 
=Introduction=
 
=Introduction=
  
Line 11: Line 13:
 
=How do you do it?=
 
=How do you do it?=
  
1) Install '''qt5-styleplugins''' and '''qt5ct'''
+
1) Install '''qt5ct'''  
  
2) Set environment variable in '''/etc/environment''' and add the following line:
+
2) Set environment variables in '''/etc/profile''' and add the following lines:
  
'''QT_QPA_PLATFORMTHEME=qt5ct'''
+
'''export QT_QPA_PLATFORMTHEME="qt5ct"'''
  
3) Restart the system
+
'''export QT_AUTO_SCREEN_SCALE_FACTOR=0'''
  
4) Start '''qt5ct''' from terminal and select '''gtk2'''
+
3) source the file by using: <code>source /etc/profile</code>
  
5) Start one more time '''qt5ct''' from terminal with sudo rights (for qt apps which required sudo rights like manjaro-settings-manager) and select '''gtk2'''
+
4) Start '''qt5ct'''  
 +
 
 +
5) In the first tab '''Appearance''' choose '''Standard Dialogs: default''' (some people get crashes if they choose GTK3)
 +
 
 +
Because we used /etc/profile 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"/>
 
<br clear="all"/>
Line 39: Line 47:
 
<br clear="all"/>
 
<br clear="all"/>
 
[[Category:Contents Page]]
 
[[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
 

Revision as of 19:53, 15 May 2018

13-March-2018: Updated contents & method.

Introduction

For those of us that use Desktop Environments &/or Window Managers that use GTK+ , this fix is particularly helpful.

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.

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


How do you do it?

1) Install qt5ct

2) Set environment variables in /etc/profile and add the following lines:

export QT_QPA_PLATFORMTHEME="qt5ct"

export QT_AUTO_SCREEN_SCALE_FACTOR=0

3) source the file by using: source /etc/profile

4) Start qt5ct

5) In the first tab Appearance choose Standard Dialogs: default (some people get crashes if they choose GTK3)

Because we used /etc/profile 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.)


Links

This ArchWiki page goes into far more detail:

Uniform look for Qt and GTK applications [1]


Support

Following is a link to this page's forum counterpart where you can post any related feedback: [2]