lxqt / lxqt-qtplugin

LXQt Qt platform integration plugin
https://lxqt.github.io
GNU Lesser General Public License v2.1
24 stars 14 forks source link

Check the existence of qApp #84

Closed tsujan closed 3 months ago

tsujan commented 3 months ago

Fixes https://github.com/lxqt/lxqt-qtplugin/issues/83

Chiitoo commented 3 months ago

Works great for me so far.

Thank you!

tsujan commented 3 months ago

@Chiitoo, thanks a lot!

Now I remember: I'd encountered the problem reported at https://github.com/lxqt/lxqt-qtplugin/issues/83 with Qt5 but considered it as a bug in kglobalacceld. So, every time I wanted to apply settings, I stopped kglobalacceld first. And I changed those settings only 2-3 times in a century ;)

tsujan commented 3 months ago

The change is straightforward: checking qApp for nullity. Merging...

Chiitoo commented 3 months ago

Heh, yeah, I generally don't touch those settings either, but when I started using custom colours via the Qt Palette (which is great!), I do it at least once per boot/X-session restart.

I don't remember if it happened from the start, but at least for a long time now, when I start Konsole (probably any KDE app I guess), the colours don't apply.

So when I start one or two Konsole windows for several tabs, I then flip the Qt Style to something else, then back to Fusion, and the colours apply.

Never looked into what is going on there deeper yet.

(Been a month since I last restarted the X session, and I kind of forgot this a bit, thinking there was a new issue from having moved all the KDE things to Qt 6 too.)

tsujan commented 3 months ago

KDE apps usually get some of their style settings from KDE directly, especially from its "color scheme".

However, in general, on-the-fly applying of settings is never complete in Qt. The only way to make sure that you're seeing the final result is restarting the app.