You are not logged in.

#1 2018-08-19 13:09:58

halogen
Member
Registered: 2014-06-12
Posts: 67

[solved] Same OK/Cancel button order in qt & gtk?

I just moved to KDE and in all applications (e.g. qbittorrent) the OK or Save button is on the left with Cancel on the right. In GTK programs, however, it's the opposite.

Since I'm using both QT and GTK software I'd like to have uniform settings (I've almost lost data while working because I thought I had confirmed saving a file...)

Is there any way to do this? Thanks in advance...

Last edited by halogen (2018-08-20 13:03:40)

Offline

#2 2018-08-19 13:25:02

seth
Member
Registered: 2012-09-03
Posts: 49,981

Re: [solved] Same OK/Cancel button order in qt & gtk?

For Qt, it's style driven. Selecting eg. the gtk2 style should do. "pacman -S qt5-styleplugins"

Offline

#3 2018-08-19 14:17:00

metak
Member
Registered: 2009-09-27
Posts: 198

Re: [solved] Same OK/Cancel button order in qt & gtk?

I'm using qt5ct to set qt5 settings and there's "Interface" tab where you can choose in "Dialog buttons layout" KDE, GNOME, Windows, Mac OS.

Offline

#4 2018-08-19 17:51:52

halogen
Member
Registered: 2014-06-12
Posts: 67

Re: [solved] Same OK/Cancel button order in qt & gtk?

Thanks for your replies.

I've tried both solutions: the first one using qt5-styleplugins works, although gtk is ugly and I'd prefer Breeze's widget style...

I also installed qt5ct and did an export QT_QPA_PLATFORMTHEME="qt5ct" (else it returns an error), selected the Gnome dialog buttons layout but nothing seems to change in both qt and gtk applications (also tried the other available settings: kde, etc.)

Offline

#5 2018-08-19 18:25:58

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: [solved] Same OK/Cancel button order in qt & gtk?

Did you make sure said other applications were actually using the QT_QPA_PLATFORMTHEME as well?


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#6 2018-08-20 13:03:29

halogen
Member
Registered: 2014-06-12
Posts: 67

Re: [solved] Same OK/Cancel button order in qt & gtk?

Eschwartz wrote:

Did you make sure said other applications were actually using the QT_QPA_PLATFORMTHEME as well?

That was my error, it works now - but it's basically the same thing as choosing the qt5-styleplugins as Seth suggested.

gtk widgets are just too ugly in qt apps, I guess I'll learn to live with that weird button order instead...

Offline

#7 2018-09-18 02:16:02

doskoi
Member
Registered: 2016-04-10
Posts: 21

Re: [solved] Same OK/Cancel button order in qt & gtk?

You can reverse the order in GTK with gtk-alternative-button-order = 1 in ~/.gtkrc-2.0 and/or $XDG_CONFIG_HOME/gtk-3.0/settings.ini.

Offline

Board footer

Powered by FluxBB