Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Set Qt theme and font without qt5ct
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 901
Location: Italy

PostPosted: Mon Dec 16, 2019 9:55 am    Post subject: Set Qt theme and font without qt5ct Reply with quote

I use the i3 window manager and the qutebrowser web browser. I'd like to configure my preferred font face and size for Qt5 without using any graphical tools such as qt5ct. In particular, I'd like to use some plain text configuration file so that it can be added to my dotfiles git repository. qt5ct's configuration file is not really meant to be read by humans, so I don't like it. When I used GTK I could use the ~/.config/gtk-3.0/settings.ini file and add a few lines:
Code:
[Settings]
gtk-icon-theme-name = Adwaita
gtk-theme-name = Adwaita
gtk-font-name = DejaVu Sans 11

Can I do something similar with the Qt5 toolkit?
Back to top
View user's profile Send private message
mike155
Veteran
Veteran


Joined: 17 Sep 2010
Posts: 1994
Location: Frankfurt, Germany

PostPosted: Mon Dec 16, 2019 6:46 pm    Post subject: Reply with quote

On my machines, Qt5 and KDE applications use the configuration file:
Code:
~/.config/${QT_QPA_PLATFORMTHEME}/${QT_QPA_PLATFORMTHEME}.conf

Below is the contents of this file
Code:
[Appearance]
color_scheme_path=/usr/share/qt5ct/colors/waves.conf
custom_palette=false
icon_theme=oxygen
standard_dialogs=default
style=Fusion

[Fonts]
fixed=@Variant(\0\0\0@\0\0\0\x1e\0S\0o\0u\0r\0\x63\0\x65\0 \0\x43\0o\0\x64\0\x65\0 \0P\0r\0o@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)
general=@Variant(\0\0\0@\0\0\0\n\0\x41\0r\0i\0\x61\0l@$\0\0\0\0\0\0\xff\xff\xff\xff\x5\x1\0\x32\x10)

[Interface]
activate_item_on_single_click=1
buttonbox_layout=0
cursor_flash_time=1000
dialog_buttons_have_icons=1
double_click_interval=400
gui_effects=@Invalid()
keyboard_scheme=2
menus_have_icons=true
show_shortcuts_in_context_menus=true
stylesheets=@Invalid()
toolbutton_style=4
underline_shortcut=1
wheel_scroll_lines=3

[SettingsWindow]
geometry=@ByteArray(\x1\xd9\xd0\xcb\0\x3\0\0\xff\xff\xff\xfd\xff\xff\xff\xf6\0\0\x2\xf7\0\0\x2Z\0\0\0\0\0\0\0\
x14\0\0\x2\xf4\0\0\x2W\0\0\0\0\0\0\0\0\a\x80\0\0\0\0\0\0\0\x14\0\0\x2\xf4\0\0\x2W)

Broke a long line ($geometry) to make the forum layout behave.Chiitoo
Back to top
View user's profile Send private message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 901
Location: Italy

PostPosted: Mon Dec 16, 2019 7:22 pm    Post subject: Reply with quote

Thanks for the reply, but as you can see that configuration files contains some "unreadable" settings (fixed, general, and geometry)...
Back to top
View user's profile Send private message
fturco
l33t
l33t


Joined: 08 Dec 2010
Posts: 901
Location: Italy

PostPosted: Sun Dec 29, 2019 9:59 am    Post subject: Reply with quote

https://forum.qt.io/topic/109830/set-qt-theme-and-font-without-qt5ct
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum