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

[qt6] Kvantum is not installed on your system (Kvantum style) #865

Closed
paulcarroty opened this issue Mar 23, 2023 · 14 comments
Closed

[qt6] Kvantum is not installed on your system (Kvantum style) #865

paulcarroty opened this issue Mar 23, 2023 · 14 comments

Comments

@paulcarroty
Copy link

paulcarroty commented Mar 23, 2023

Got the error on kvantummanager:

Kvantum is not installed on your system.
Please first install the Kvantum style plugin!

Installed with prefix=/opt, the kvantumpreview works and qt6ct is able to pick the Kvantum theme. Environment - GNOME 42 on Wayland.

Qt 6.2.1
strace.log

@tsujan
Copy link
Owner

tsujan commented Mar 23, 2023

It says what it sees: libkvantum.so isn't recognized as a Qt style plugin by itself when installed in /opt; only a Qt platform plugin like qt6ct may recognize it.

This is how Qt works — more precisely, QStyleFactory.

@tsujan tsujan closed this as completed Mar 23, 2023
@paulcarroty
Copy link
Author

Ohh, thanks.

@tsujan
Copy link
Owner

tsujan commented Mar 23, 2023

There's something I don't understand — or, perhaps, have misunderstood. Even if you use prefix=/opt, libkvantum.so should be installed in Qt's plugin install directory, and so, recognized. Where is ibkvantum.so in your case?

@paulcarroty
Copy link
Author

libkvantum.so is in /opt and the Qt's plugin path is fixed with QT_PLUGIN_PATH environment variable.

@tsujan
Copy link
Owner

tsujan commented Mar 23, 2023

Thanks! That explains why the plugin isn't seen by Qt.

I think if you run kvantummanager after exporting QT_PLUGIN_PATH to the same place in a terminal emulator, it'll start (exporting it globally might have serious side effects).

@paulcarroty
Copy link
Author

Nope, same error, with globally and locally QT_PLUGIN_PATH.

@tsujan
Copy link
Owner

tsujan commented Mar 23, 2023

Strange! Qt doc explains it here: https://doc.qt.io/qt-6/deployment-plugins.html.

If that EV sets the plugin path, then QStyleFactory::keys() should see it, while your test shows that QStyleFactory doesn't consult QT_PLUGIN_PATH. That may be an inconsistency (or bug) in Qt.

Kvantum Manager needs QStyleFactory::keys() to check if Kvantum is installed as a Qt style plugin. because it should be styled only by Kvantum.

@paulcarroty
Copy link
Author

Yeah:

For example, on Windows, if the application is in C:\Program Files\MyApp and it has a style plugin, Qt looks in C:\Program Files\MyApp\styles.

I will test the next ways:

  • libkvantum.so symlink in /usr /to /opt
  • edit plugin paths in qt.conf
  • qt5 build

@paulcarroty
Copy link
Author

Update: the libkvantum.so symlink and qt.conf both failed, but the q5 build works out the box, with local or global QT_PLUGIN_PATH.

@paulcarroty paulcarroty changed the title Kvantum is not installed on your system (Kvantum style) [qt6] Kvantum is not installed on your system (Kvantum style) Mar 24, 2023
@tsujan
Copy link
Owner

tsujan commented Mar 24, 2023

q5 build works out the box

So, there may be a regression in Qt6. The documentation is the same.

@paulcarroty
Copy link
Author

@tsujan
Copy link
Owner

tsujan commented Apr 1, 2023

Do you have the Qt5 plugin alongside the Qt6 one? Kvantum Manager is compiled against Qt5 by default.

In the above discussion, I supposed that you somehow enforced a Qt6 compilation for Kvantum Manager (that's possible with qmake). If not, and if you don't have the Qt5 plugin, there is no bug in Qt6 in this regard.

@paulcarroty
Copy link
Author

Do you have the Qt5 plugin?

Yeah, just checked it to be sure.

you somehow enforced a Qt6 compilation for Kvantum Manager (that's possible with qmake)

Yes.

@paulcarroty
Copy link
Author

It happened 'cause this command failed silently:

DESTDIR=%{buildroot} cmake --install build6

Fixed by

install -Dm644 build6/style/libkvantum.so %{buildroot}/usr/lib64/qt6/plugins/styles/libkvantum.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants