craftablescience / VPKEdit

A CLI/GUI tool to create, read, and write several pack file formats.
https://developer.valvesoftware.com/wiki/VPKEdit
MIT License
251 stars 19 forks source link

Does not load system Qt theme #93

Open ThePiGuy24 opened 9 months ago

ThePiGuy24 commented 9 months ago

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)

craftablescience commented 9 months ago

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?

ThePiGuy24 commented 9 months ago

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 commented 9 months ago

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

ghost commented 9 months ago

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

ghost commented 9 months ago

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

Trico-Everfire commented 8 months ago

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.

ashifolfi commented 8 months ago

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.