VPKEdit icon indicating copy to clipboard operation
VPKEdit copied to clipboard

Does not load system Qt theme

Open ThePiGuy24 opened this issue 1 year ago • 7 comments

Describe the Bug

The application does not use the systems default Qt theme on Linux, rather using its own themes.

To Reproduce

Start the application on a system with a Qt theme set, and see that the application does not use it, nor is it available in the themes configuration dropdown image (VPKEdit on left, example of application following system Qt theme on right)

Operating System

Arch Linux (kernel: 6.7.4-arch1-1; DE: LXQt 1.4.0); VPKEdit 4.0.0 (but issue persists in 4.0.1)

ThePiGuy24 avatar Feb 14 '24 05:02 ThePiGuy24

According to the Arch Linux wiki, Kvantum is usually compiled for Qt5

Kvantum is treated as a style instead of a platform theme. To set Kvantum for all qt applications using environment variables, issue QT_STYLE_OVERRIDE=kvantum

Does this change anything? Does passing -style kvantum on the command line change anything?

craftablescience avatar Feb 14 '24 13:02 craftablescience

No, they both result in "QApplication: invalid style override 'kvantum' passed, ignoring it."

[x@craptop ~]$ QT_STYLE_OVERRIDE=kvantum vpkedit
QApplication: invalid style override 'kvantum' passed, ignoring it.
        Available styles: Windows, Fusion
[x@craptop ~]$ vpkedit -style kvantum
QApplication: invalid style override 'kvantum' passed, ignoring it.
        Available styles: Windows, Fusion

ThePiGuy24 avatar Feb 15 '24 02:02 ThePiGuy24

It also cannot see or use the normal Breeze theme, resulting in similar output when applied by that method

ThePiGuy24 avatar Feb 15 '24 02:02 ThePiGuy24

i'm also getting this issue, it's getting hard to work at night with a sun on your face

ghost avatar Feb 15 '24 02:02 ghost

oh yeah and kvantum should appear in your "Available styles" list if it's installed, and if it is installed run "QT_STYLE_OVERRIDE=kvantum" instead

ghost avatar Feb 15 '24 02:02 ghost

I didn't know this was a bug, but yes, this does happen to me too. The strange part is, it doesn't happen if I compile it from source. It seems it has to do with the installer/reinstalled bins.

Trico-Everfire avatar Feb 23 '24 09:02 Trico-Everfire

Qt applications use shared library files for the various styles. If the application doesn't end up looking at the system libraries but instead uses entirely its own it won't see any of the other installed style libraries and thus won't use them.

ashifolfi avatar Feb 23 '24 20:02 ashifolfi