View previous topic :: View next topic |
Author |
Message |
leonid n00b
Joined: 23 May 2003 Posts: 15 Location: Moscow Russia
|
Posted: Sun Oct 25, 2015 5:51 pm Post subject: [SOLVED] XFCE4 and font setup for Qt5 application |
|
|
Hello!
After upgrade my qt-creator was up to 3.x, so it is build with Qt5. But fonts in it (menus and dialogs) is differ than in other apps (Qt4 and gtk for example). QtConfig program does not work with Qt5.
How could I setup fonts for Qt5? _________________ Leonid Kolesnik
Last edited by leonid on Fri Jun 23, 2017 7:27 am; edited 3 times in total |
|
Back to top |
|
|
SpaceToast n00b
Joined: 16 Oct 2015 Posts: 19
|
Posted: Tue Nov 17, 2015 12:08 pm Post subject: |
|
|
Qt5 does not ship with qtconfig, and rather decides what to do based on the desktop environment you are using.
This is the behavior:
- Under Plasma 5: use selected Qt style (systemsettings5)
- Under KDE4: Oxygen (if available), then Fusion
- Cinnamon, Gnome, MATE, LXDE, Xfce: GTK+ (QGtkStyle)
- Other: Fusion
You can change what it detects by exporting QT_QPA_PLATFORMTHEME in your profile.
You could add USE=gtkstyle to qtgui, rebuild it, export QT_QPA_PLATFORMTHEME to gtk, and it'll then mimic your GTK config.
There is also apparently a tool named qt5ct which mimics qtconfig, but for qt5 (required to export QT_QPA_PLATFORMTHEME to qt5ct). This is however not in-tree, but you are free to experiment with it. |
|
Back to top |
|
|
leonid n00b
Joined: 23 May 2003 Posts: 15 Location: Moscow Russia
|
Posted: Thu Nov 24, 2016 1:37 pm Post subject: |
|
|
I reopen this topic as no decision found for one year.
It was acceptable while there was not many apps with qt5. But now its count increases.
So, one more time:
I use XFCE 4.12
I have some apps using qt (qt-creator (uses qt5), clementine (uses qt4) and others) and some apps from KDE (okular, for example).
qtgui installed with gtkstyle flag enabled.
QT_QPA_PLATFORMTHEME=gtk (in /etc/inveronment)
BUT:
1. Fonts in XFCE apps is ok
2. Fonts in qt4 and KDE apps is ok and the same as in XFCE apps
3. Fonts in qt5 apps is different and ugly.
No working answers in net found.
My example at screenshot:
https://www.modbus4qt.ru/download/external/img.png
Qt creator is one qt5 apps. _________________ Leonid Kolesnik |
|
Back to top |
|
|
leonid n00b
Joined: 23 May 2003 Posts: 15 Location: Moscow Russia
|
Posted: Thu Nov 24, 2016 1:52 pm Post subject: |
|
|
Discovering...
When I changed font in XFCE control panel it was changed and in qt5 apps.
So it is different rendering only
PS And qt5ct has no effect for me. Or I do something wrong. _________________ Leonid Kolesnik |
|
Back to top |
|
|
mir3x Guru
Joined: 02 Jun 2012 Posts: 455
|
Posted: Sat Nov 26, 2016 10:05 pm Post subject: |
|
|
You could in theory install lxqt, configure fonts, theme and rest.
Then export environment variable QT_QPA_PLATFORMTHEME=lxqt in your xfce.
( then u might remove all lxqt packages except lxqt-qtplugin)
EIDT: u sure its export QT_QPA_PLATFORMTHEME=gtk
and not export QT_QPA_PLATFORMTHEME=gtk2 ?? _________________ Sent from Windows |
|
Back to top |
|
|
leonid n00b
Joined: 23 May 2003 Posts: 15 Location: Moscow Russia
|
Posted: Mon Nov 28, 2016 3:24 pm Post subject: |
|
|
Sure.
I'll try use lxqt _________________ Leonid Kolesnik |
|
Back to top |
|
|
leonid n00b
Joined: 23 May 2003 Posts: 15 Location: Moscow Russia
|
Posted: Thu Dec 01, 2016 6:22 am Post subject: |
|
|
It uses gtk style. But it looks like is does not use fontconfig. _________________ Leonid Kolesnik |
|
Back to top |
|
|
leonid n00b
Joined: 23 May 2003 Posts: 15 Location: Moscow Russia
|
Posted: Fri Jun 23, 2017 7:30 am Post subject: |
|
|
The problem was in droid fonts. When I've selected any other fonts all became good.
For now for result:
1. USE flag for qtqui & qtwidgets: gtkstyle
2. QT_QPA_PKATFORMTHEME=gtk in /etc/invironment
3. Set up ubuntu font for default in XFCE settings
Fot Qt4 apps setup ubuntu font in Qt4 configuration tool
Thats all. _________________ Leonid Kolesnik |
|
Back to top |
|
|
|