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

Update content and formatting
imported>Yoy0
(replacing restart with source command)
imported>Dalto
(Update content and formatting)
Line 1: Line 1:
13-March-2018: Updated contents & method.
__TOC__


=Introduction=


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.
=Overview=


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.  
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.  


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


<br clear="all"/>
=Using qt5ct=


=How do you do it?=
{{note|In some Manjaro editions, this is already done for you by default}}


1) Install '''qt5ct'''


2) Set environment variables in '''/etc/profile''' and add the following lines:
Install {{ic|qt5ct}} using your favorite package manager or the command:
pamac install qt5ct


'''export QT_QPA_PLATFORMTHEME="qt5ct"'''


'''export QT_AUTO_SCREEN_SCALE_FACTOR=0'''
Set environment variables in {{ic|~/.profile}} by adding or updating the following lines:
export QT_QPA_PLATFORMTHEME="qt5ct"


3) source the file by using: <code>source /etc/profile</code>


4) Start '''qt5ct'''  
Run the application '''QT5 Configuration Manager''' from the menu or run the command {{ic|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.
Logout and login again to make the change effective


(If you find that certain widget styles are missing, you can see if qt5-styleplugins brings a fix for you.)


<br clear="all"/>
=See Also=


=Links=
* [https://wiki.archlinux.org/index.php/Uniform_Look_for_Qt_and_GTK_Applications Arch Wiki]
* Matching [https://forum.manjaro.org/t/wiki-set-all-qt-apps-to-use-your-gtk-theme-font-settings/17654 Forum Topic]


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]]
[[Category:Contents Page]]
Anonymous user