SUMMARY Note: this is not a systemsettings bug. It affects all KDE applications. I just don't know in which category to put it. STEPS TO REPRODUCE 1. Install Gnome as well as one or two KDE applications (e.g. Dolphin, Gwenview) 2. Open a KDE application OBSERVED RESULT The cursor in the KDE application is different from, and a lot bigger than, the cursor used in every other application. EXPECTED RESULT KDE applications should follow the cursor theme of the current desktop environment. SOFTWARE/OS VERSIONS Linux/KDE Plasma: KDE Frameworks Version 5.107.0 Qt Version 5.15.10 (Would be great if there was an easy way to get this information. "About system" only works when using KDE as the desktop. I hope KDE applications are generally intended to work with other desktops as well, so this form should not assume that I am using KDE as my desktop.) ADDITIONAL INFORMATION
Are you able to reproduce the issue with other apps using Qt that aren't KDE apps? For example, Telegram or QBitTorrent?
QGit has the same problem.
In that case I'm afraid it's a setup problem in the distro. Qt apps expect to have a "QT Platform Theme" set that tells them all what kind of settings and theming to use. So either no QPT is set in the distro and Qt is falling back to its internal default settings, or else a QPT is set but it doesn't specify the cursor theme. In either case this should be reported to the distro.
Which package in the distro would you recommend should this be reported against? As you probably know, there is no way to just report an issue against "the distro", it needs to be e.g. the Qt package. FWIW, here are the relevant environment variables on my system: QT_ACCESSIBILITY=1 QT_QPA_PLATFORMTHEME=qt5ct QTWEBENGINE_DICTIONARIES_PATH=/usr/share/hunspell-bdic/ QT_QPA_PLATFORM=wayland QT_IM_MODULE=ibus I had to set some of them by hand as the default experience of Qt apps under Gnome is abysmal. This is in my ~/.profile: # make Qt apps look reasonable under Gnome if [ "$XDG_CURRENT_DESKTOP" == "GNOME" ]; then export QT_QPA_PLATFORMTHEME=qt5ct export QT_QPA_PLATFORM=wayland fi
Probably this one: https://github.com/FedoraQt/QGnomePlatform > QT_QPA_PLATFORMTHEME=qt5ct That's the problem; qt5ct is a DIY QPT that gives you the user control over everything a QPT can do. When using it, it becomes your responsibility to configure it to your liking. But if you're looking for something that works well out of the box, qt5ct is not the best choice. :) I know there's some resistance to the concept of adopting a native look-and-feel in some GNOME circles, but Qt is based around this concept, so when a GNOME-focused distro fails to do the necessary setup, the end result is that Qt apps look and feel terrible when run in GNOME. They may not like it, but ensuring that a sane QPT is set by default is one of the basic integration responsibilities of a distro.
Thanks for getting back to this! I know dealing with user complaints can be tiring, and I appreciate the time you are taking. :) > That's the problem; qt5ct is a DIY QPT that gives you the user control over everything a QPT can do. When using it, it becomes your responsibility to configure it to your liking. But if you're looking for something that works well out of the box, qt5ct is not the best choice. :) Without that env var (i.e., out of the box), it looks even worse, and the cursor is just as wrong. So qt5ct is not responsible for the cursor problem. > Probably this one: https://github.com/FedoraQt/QGnomePlatform "QGnomePlatform project is unmaintained a no longer actively developed." I have qt5-gtk-platformtheme installed. I have no idea if there's anything I am expected to do beyond installing it, but it doesn't seem to help. > I know there's some resistance to the concept of adopting a native look-and-feel in some GNOME circles, but Qt is based around this concept, so when a GNOME-focused distro fails to do the necessary setup, the end result is that Qt apps look and feel terrible when run in GNOME. They may not like it, but ensuring that a sane QPT is set by default is one of the basic integration responsibilities of a distro. I'm not sure if I would call Debian a GNOME-focused distro. It's a "we have everything" distro, isn't it? The Qt package can't know which DE I am using. Obviously most KDE contributors use KDE as their DE so there's no reason why they would care about how their apps look like on GNOME, and I can't blame them for that, it's free software after all. But it is unfortunate that this means mixing the best parts of GNOME and KDE is a lot more work than it should be. If Qt aims to be "native" in every environment it is started in, I guess it would be a Qt bug (or at least feature request) if Qt apps don't look native on GNOME by default? It would certainly be a bug if Qt apps looked like this on Windows or macOS...
> I know there's some resistance to the concept of adopting a native look-and-feel in some GNOME circles It is true that GNOME apps look not "native" on KDE desktops, as they just ignore the DE and do their own thing. And from a KDE perspective that's probably a bug in the GNOME apps. But honestly that's better than what happens with Qt/KDE apps. They don't look "native" on GNOME desktops either, and while GNOME apps have a very well-polished but "non-native" look in KDE, KDE apps just fall back to the standard "Fusion" Qt theme, which is not nearly as nice as Breeze or the GNOME look. It's not native either way.
> Without that env var (i.e., out of the box), it looks even worse, and the cursor is just as wrong. > So qt5ct is not responsible for the cursor problem. It's not that qt5ct is responsible for the problem; but rather it isn't an automatic fix for the problem. Setting qt5ct makes it your QPT, and thus allows *you* to fix the problem yourself using qt5ct's built-in config UI somewhere. > "QGnomePlatform project is unmaintained a no longer actively developed." :/ > I have qt5-gtk-platformtheme installed. I have no idea if there's anything I am expected to do beyond > installing it but it doesn't seem to help. You have to set the QT_QPA_PLATFORMTHEME envar to it, rather than qt5ct. I don't know what its technical name is though, sorry. You'll have to figure that our yourself. > I'm not sure if I would call Debian a GNOME-focused distro. It's a "we have everything" distro, isn't it? > The Qt package can't know which DE I am using. > > Obviously most KDE contributors use KDE as their DE so there's no reason why they would care about > how their apps look like on GNOME, and I can't blame them for that, it's free software after all. But it > is unfortunate that this means mixing the best parts of GNOME and KDE is a lot more work than it > should be. If Qt aims to be "native" in every environment it is started in, I guess it would be a Qt bug > (or at least feature request) if Qt apps don't look native on GNOME by default? It would certainly be > a bug if Qt apps looked like this on Windows or macOS... It's not really Qt's fault; rather, there's a bit of a mismatch between how Qt does platform theming, and what people in the non-QT world tend to care about. The way Qt works is that it expects for the environment it's run in to set a QPT that tells it how to integrate Qt apps into that environment so they look and feel correct. This is *how* Qt apps know how to look and feel native in the environment they're run in. But if the environment doesn't bother to provide a QPT, then the integration doesn't happen and Qt apps look and feel junky. Someone needs to write that QPT for their environment, so that Qt apps feel native in it. That someone is by definition not a Plasma user--or else they'd be using Plasma's own QPT. Thus it is a bit of an annoying chore for them; they need to care about consistent theming between apps from different developers and cultures, and have the technical expertise with Qt and time to write a QPT. Clearly GNOME people do not have the interest, skill, and/or time to get it done. That's fine; I can't blame them. So the task basically falls to distro maintainers. In fact this is one of the reasons why distros exist: to *integrate* together all the weird and wacky diverse components that come from different people and groups and projects, so that the final result is reasonably harmonious. Writing a QPT to make Qt apps look and feel nice in a non-Plasma environment is something I would definitely expect of distro developers. Maybe they could even collaborate on it so no one distro has to do it all themselves. In the absence of that, Distros that don't care about this even a little bit could even be lazy and set Plasma-Integration as the QPT for their non-Plasma environments, and then at least Qt apps would be Breeze-themed and look KDE-ish. They wouldn't look native in a GTK environment, but they'd look better than they do when using the default Fusion theme. Hopefully that clarifies the situation.
> The way Qt works is that it expects for the environment it's run in to set a QPT that tells it how to integrate Qt apps into that environment so they look and feel correct. This is *how* Qt apps know how to look and feel native in the environment they're run in. But if the environment doesn't bother to provide a QPT, then the integration doesn't happen and Qt apps look and feel junky. I doubt Microsoft and Apple are providing QPT so that can't be the full story. But also, Qt can't just declare that someone else must do some work. That's not how open-source works. > Clearly GNOME people do not have the interest, skill, and/or time to get it done. That's fine; I can't blame them. So the task basically falls to distro maintainers. No, I can't agree with that. Distro maintainers do integration, yes, by gluing together what exists and then testing that it all works together. It is not their task to *write entirely new UI themes* for a toolkit that unilaterally decided that it wants to out-source this work. If Qt wants to look and feel native wherever possible, that's great. But that should come *on top of* providing a good baseline that works everywhere that Qt hasn't yet gained native support for. I don't expect Qt applications in GNOME to be perfectly polished and integrated without help from the GNOME people. But I do expect them to meet a reasonable baseline, and it is Qt's responsibility to deliver that baseline.
Getting back to the issue of cursor.. "QT_QPA_PLATFORMTHEME=breeze qgit" also uses the wrong cursor theme. Is that a bug in Breeze or not? qt5ct does not provide any way to set a custom cursor, so I don't think this is a case of that theme being configured incorrectly. Literally every single Qt theme I tried uses the wrong cursors. It's clearly not just a KDE theme issue though so I'll report this with Qt directly. Also, setting QT_QPA_PLATFORM=xcb fixes the cursor. So this seems to be Wayland-related.
Ah, in fact it seems it was already reported: https://bugreports.qt.io/browse/QTBUG-67579 https://bugreports.qt.io/browse/QTBUG-87778 It is labeled as fixed for Qt 5.15.12, I am on Qt 5.12.10. I see 5.15.12 is in Debian experimental so I hope I'll get the fix soon-ish. :D
Great news! Regarding this: > I doubt Microsoft and Apple are providing QPT so that can't be the full story. Indeed, Qt contains built-in compatibility layers for the major platforms. It's just the smaller ones (like ours) where the platform is expected to provide their own QPA. FWIW I don't really disagree with you, and I agree the current situation isn't ideal. However it's what we have available absent changes in Qt. So if you have complaints about how Qt handles platform compatibility, it would be good to bring it up with them.