Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not load system Qt theme #93

Open
ThePiGuy24 opened this issue Feb 14, 2024 · 7 comments
Open

Does not load system Qt theme #93

ThePiGuy24 opened this issue Feb 14, 2024 · 7 comments
Assignees
Labels
bug Something isn't working

Comments

@ThePiGuy24
Copy link

ThePiGuy24 commented Feb 14, 2024

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 ThePiGuy24 added the bug Something isn't working label Feb 14, 2024
@craftablescience
Copy link
Owner

craftablescience commented Feb 14, 2024

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
Copy link
Author

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
Copy link
Author

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

@ghost
Copy link

ghost commented Feb 15, 2024

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

@ghost
Copy link

ghost commented Feb 15, 2024

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
Copy link
Contributor

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
Copy link

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants