Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
The paintEvent() problem
VRonin last edited by VRonin
Since there is no "legal" section of the forum I thought I could post here to hear your opinion.
The problem in the title comes from the use I make 99% of the times of reimplementing a paint event for a widget. I normally just need to make small changes to the painting so, when reimplementing the event I just copy from the Qt sources the original code, paste it in my implementation and make the changes. Other times I basically copy the code from a paintEvent of a widget and reuse it for a delegate paint() method.
Now my question is: can I use this in a closed source product
linking the LGPL version of Qtwithout purchasing a commercial license?
My gut feeling is no but then again why should I reinvent the wheel just to overcome a licensing detail?!
Thanks in advance
amended the linking line as it was misleading
tekojo last edited by
@VRonin you probably need a software copyright layer to answer that :)
My totally layman understanding (and now I take my work hat off, as this is code owned by my employer) is that in Finland (and probably most of the EU) you would be safe if the code you are copying is practically the only way to do it, and it is so simple that it is the only reasonable solution to your problem, and that the part you are copying is short enough that could simply re-write it anytime, and you aren't copy pasting anything else from the same work.
The problem is that everything I'm saying above is way too hand-wavy to be of any use. It's always a case-by-case situation.
Linking has nothing to do with it. It is a question of does the copy-pasted material automatically bring it's license with it to your code.
If you wanted to be utterly safe, you would ask your friend, who has not seen the Qt code to implement a paintEvent once, and then use that. He probably would come up with about the same seven to ten lines of code. (clean room is the only way to be totally sure)