linuxdeploy / linuxdeploy-plugin-qt

Qt plugin for linuxdeploy, bundling Qt resources, plugins, QML files and a lot more.
https://github.com/linuxdeploy/linuxdeploy
MIT License
104 stars 37 forks source link

Dealing with platform themes #5

Open TheAssassin opened 6 years ago

TheAssassin commented 6 years ago

As I'm not a Qt expert, I'm not very much into platform themes. In my understanding, the platform themes would need to be bundled in order to be available. This is only possible if all the platform themes are available and can be copied at the time the AppDir is prepared. This might not always be true.

I just tried AppImageLauncher's AppImage (built using the trusty Qt packages) on Tumbleweed live (KDE edition), and it yields:

No protocol specified
static QPlatformTheme* QKdeTheme::createKdeTheme(): Unable to determine KDEHOME

The UI looks pretty alien, as some fallback theme is used: screenshot_2018-07-11_23-12-45

I think the first step to "fix" this is to bundle all available platform themes.

But I have a question: Is it possible to use the system platform themes (even if just in some scenarios) with AppImages built using some older Qt? That'd be really useful.

CC @azubieta

realnc commented 4 years ago

But I have a question: Is it possible to use the system platform themes (even if just in some scenarios) with AppImages built using some older Qt? That'd be really useful.

For Gtk3 desktops (and previously Gtk2), yes.

For KDE, no. The Qt platform theme for KDE is shipped by KDE, not Qt. But even if it was part of Qt, it wouldn't help. The KDE platform theme links against both Qt and KDE libs, and the KDE libs in turn link against Qt. So you'd end up with the application loading two sets of Qt libraries (bundled and system provided ones.) This cannot work, even if both sets of libraries were the same version.

haampie commented 4 years ago

My experience on Ubuntu: I've bundled an Appimage via linuxdeploy-plugin-qt under Ubuntu 16.04 using DEPLOY_PLATFORM_THEMES=1, but it did not run properly on Ubuntu 19.10 is what I found out later.

TheAssassin commented 4 years ago

I don't see how we can work around the problem on KDE then...

realnc commented 4 years ago

I don't see how we can work around the problem on KDE then...

Yeah, it's not a packaging issue. You'd need to deploy a full set of KDE libraries and their deps as well (like flatpak does; Qt apps need the KDE runtime). I think this is out of scope for appimage.