Qt5ct: Difference between revisions
From wikinotes
(4 intermediate revisions by the same user not shown) | |||
Line 12: | Line 12: | ||
|} | |} | ||
</blockquote><!-- Documentation --> | </blockquote><!-- Documentation --> | ||
= Locations = | |||
<blockquote> | |||
{| class="wikitable" | |||
|- | |||
| <code>~/.config/qt5ct/qt5ct.conf</code> || user config | |||
|- | |||
| <code>~/.config/qt5ct/qss/*.qss</code> || user qss stylesheets for UI | |||
|- | |||
|- | |||
| <code>/usr/share/qt5ct/qss/*.qss</code> || installed qss stylesheets referenced in UI | |||
|- | |||
|} | |||
</blockquote><!-- Locations --> | |||
= Enable = | = Enable = | ||
Line 22: | Line 36: | ||
= Configuration = | = Configuration = | ||
<blockquote> | <blockquote> | ||
== Stylesheet Overrides == | |||
<blockquote> | |||
Add your own stylesheet overrides to <code>~/.config/qt5ct/qss/*.qss</code>.<br> | |||
Enable your overrides in <code>~/.config/qt5ct/qt5ct.conf</code> under <code>[Interface]stylesheets</code>. | |||
See [[Python qt: colours/stylesheets]] for syntax. | |||
<syntaxhighlight lang="css"> | |||
/* ~/.config/qt5ct/qss/*.qss */ | |||
QSlider::groove:horizontal { | |||
border: 1px solid palette(mid); | |||
background: palette(alternate-window); | |||
height: 10px; | |||
border-radius: 3px; | |||
} | |||
QSlider::groove:vertical { | |||
border: 1px solid palette(mid); | |||
background: palette(alternate-window); | |||
width: 10px; | |||
border-radius: 3px; | |||
} | |||
</syntaxhighlight> | |||
<syntaxhighlight lang="dosini"> | |||
# ~/.config/qt5ct/qt5ct.conf | |||
[Interface] | |||
stylesheets=/usr/share/qt5ct/qss/sliders-simple.qss, /usr/share/qt5ct/qss/tooltip-simple.qss | |||
</syntaxhighlight> | |||
</blockquote><!-- Stylesheet Overrides --> | |||
</blockquote><!-- Configuration --> | </blockquote><!-- Configuration --> |
Latest revision as of 04:19, 4 September 2022
Qt5 attempts to match settings from current desktop environment.
qt5ct lets you set deskto-environment agnostic overrides.
Documentation
man qt5ct
https://manpages.ubuntu.com/manpages/bionic/man1/qt5ct.1.html repo https://sourceforge.net/projects/qt5ct/
Locations
~/.config/qt5ct/qt5ct.conf
user config ~/.config/qt5ct/qss/*.qss
user qss stylesheets for UI /usr/share/qt5ct/qss/*.qss
installed qss stylesheets referenced in UI
Enable
export QT_QPA_PLATFORMTHEME=qt5ct
Configuration
Stylesheet Overrides
Add your own stylesheet overrides to
~/.config/qt5ct/qss/*.qss
.
Enable your overrides in~/.config/qt5ct/qt5ct.conf
under[Interface]stylesheets
.See Python qt: colours/stylesheets for syntax.
/* ~/.config/qt5ct/qss/*.qss */ QSlider::groove:horizontal { border: 1px solid palette(mid); background: palette(alternate-window); height: 10px; border-radius: 3px; } QSlider::groove:vertical { border: 1px solid palette(mid); background: palette(alternate-window); width: 10px; border-radius: 3px; }# ~/.config/qt5ct/qt5ct.conf [Interface] stylesheets=/usr/share/qt5ct/qss/sliders-simple.qss, /usr/share/qt5ct/qss/tooltip-simple.qss