How to write a QML effect for KWin
blog.vladzahorodnii.com
blog.vladzahorodnii.com
Unfortunately, it seems with the upgrade to Plasma6 (which I got immediately since I'm on Arch) KDE broke completely and I had to switch to XFCE...
I had a few issues on my laptop as well and only upgraded the desktop once the issues on the laptop were resolved (which took a bit more than a week I think?). Was not expecting basically complete breakage.
On my laptop the keyboard shortcuts magically restored themselves after I logged in and out of X11 and Wayland mode a few times. I'd try that on my desktop if I could get the UI for logging out to spawn :) (or the UI to configure the shortcuts)
> Have you tried setting them up from scratch?
I couldn't summon any UI to set them up (remember that there's no panels or desktop to click and that KDE applications in general have rendering issues that can render them unusable). I suspect it won't help though since when I log in I can see them blinking in and out of existence a few times before disappearing permanently, I assume crashing and restarting a few times before giving up on running.
> the default panel is great
I do have quite a bit of customizations on top of the default that I'd rather not lose, but I'll set them up again if I have to. After it looks like it will actually work that is.
Edit: Was able to temporarily "fix" things (doesn't fix rendering issues, but makes desktop usable again) by reseting the panel configuration, and then some simple fixes to its appearance broke everything again... Sounds like it will be a while before Plasma 6 is ready for me to switch back to it.
P.S. It looks slow because it's a GIF, but it's actually very smooth.
My first Google Summer of Code project (aka my first internship ever during my freshman year of college) was implementing some of the animations (like Grow) in KDE Plasma. I'm not sure I did great work, but it felt awesome to be doing it - KDE 4 had just come out, it was extremely shiny and this was the era of the desktop cube and wobbly windows as desktop compositing had just become a thing in linux!
My understanding is that it's $3,950 per year just to develop using their libraries on your own computer if you ever in the future intend to commercialize your project using QT. Transitioning from the open source license to the commercial license is something you can do but it's not the happy path according to their FAQ.
My understanding is that some of the QT libraries or older forked versions of them are still completely under open source licenses but it seems like a very complicated situation if you have commercial aspirations with your project.
Something like Slint (Rust based but includes CPP and JS bindings) is not as comprehensive (yet) but it's more modern and the licensing terms are significantly more in line with software industry norms.
GPUI from Zed is also something to monitor: https://www.gpui.rs/
Also, in general you can find an extensive list of Rust-based native UI libraries here: https://areweguiyet.com/
Lots of GUI native, non-web libraries have been started in Rust, but they are VERY far from being close to what Qt supports. You may get closer using web based libraries (Tauri, etc), but I wouldn’t personally start web based desktop applications.
Which on that note, last I knew getting Qt apps correctly stripped and packaged for all platforms was a bit of a bear. In particular I remember building Mac application bundles being messy.
That said, I really think Qt should have a separate commercial license that is exactly like LGPL but allows you to link statically and costs much less (without all the enterprisy things).
Yes, things have changed. So annoying you can't just download an offline installer using a mirror of your choice, for example.
> One problem with Qt is that some modules are under the GPL and it is easy to end up inadvertently with a GPL dependency.
I never encountered such a problem, the GPL modules always seemed very niche and targeted toward specific industries (automobile, etc).
Pricing can change. Yes, there's a perpetual "Buyout" license for $5k, but they can probably just rename the product and claim it's a new one (or add a second product and add commercially relevant eggs to that basket; Qt has tried with things like "Qt for Device Creation" and "Qt for Automotive").
The open source option is not backed by a poison-pill protection like the Free Qt Foundation agreement either.
I know the people behind Slint, and I have a lot of trust toward them. But ownership can change, too.
"We believe that open-source software development and communities are the foundation for a healthy ecosystem of high-quality software, where everyone can learn, improve and give back. We commit to upholding this foundation and pledge by promising to continue to develop Slint in the open under an open-source license compliant with the Open Source Definition.
Further, we commit to provide a royalty-free license for those who develop desktop or web applications and do not want to use open-source components under copyleft licenses."
The royalty free is even better than the LGPL for Rust because rust doesn't support dynamic linking or even re-linking with object files.
Qt is LGPLv3 + GPLv3 which are clearly open source licenses.
Source: I work in a company that heavily uses Qt
1. Nothing in copyleft licenses forbids you from making a living or receiving money.
2. Since the post was about writing an effect for KWin and your alternatives do nothing of sort… perhaps they aren't really valid alternatives, at least in this context.
This could potentially boost the KDE extension ecosystem by lowering the entry barrier for existing React devs familiar with the JSX syntax.
If you want to use the same API of an existing web framework, I'm sure that wouldn't work, since QML is exposing C++ objects to js code, so the API is set.
If your js does no I/O at all, you can write pure js. But if you want to show some results, there is no way that you can do it without learning the relevant API to do that.
With Qt Widgets, it is annoying to create models (QAbstractItemModel), they are more difficult to implement than what it should and prone to errors. I haven’t done much QML beyond simple sample apps, but it seemed you still have to create Qt models for a lot of use cases.
It's like saying why people had to invent JSX in their react app when they could use JSON.