2

I want to develop a GUI in python for my company in order to sell it to the customer.

Being fresh from the university where I used pyQt, I promptly started programming using that library, just to discover the fact that it is under GNU GPL, making it unusable for my purpose.

Searching in the web for an alternative, I encountered a similar question where they suggest to use PySide, being it completely free and under a different license.

At this point, I have a few questions:

  1. pyQt has another option: the commercial license. My company is ok paying a little amount of money (like 500$) but then do we need to pay for Qt also?

  2. PySide is under LGPL, does this mean that I can sell my programs without having to make my code open source? (even if pyside uses qt itself)

  3. I started using PySide2 instead of PySide, is there any difference related to the license topic?

1 Answers1

4

Qt, unless you buy an exception, is licensed as LGPL. This means that whatever modifications you make to Qt has to also be released as LGPL. Your application, on the other hand, does not have to be licensed as LGPL, as long as you make it possible for your users to link your application against their own version of Qt. That is, you're not allowed to statically link Qt to your application. The same would be true of PySide (and PySide2, which a cursory web search tells me is also LGPL).

  • What do you mean by *modifications*? – Francesco Pegoraro Apr 17 '19 at 08:42
  • If you fork the Qt project, or make a bug fix or feature addition. That code must be licensed as LGPL. Practically speaking you probably won't need to modify Qt, and if you do, you're probably better off just [contributing it directly to the Qt project](https://wiki.qt.io/Qt_Contribution_Guidelines). The purpose of the LGPL is to allow your users to also fork or modify Qt, and still be able to use it together with your application. – Salvatore Shiggerino Apr 17 '19 at 08:50
  • ok this is not the case then... Instead, what does *statically link* mean regarding python? I mean, every import is dynamic! Is it related to the use of PyInstaller or cx_freeze to obtain .exe of the programs? – Francesco Pegoraro Apr 17 '19 at 08:54
  • I'm not familiar enough with Python tools to provide a detailed answer. Do PyInstaller or cx_freeze include any Qt binaries in the same file, or will they be loaded from an external .dll? The key is whether something prevents the users from substituting the Qt implementation used with their own. If it's loaded from an external .dll, nothing should reasonably prevent them from compiling their own version with their own modifications. – Salvatore Shiggerino Apr 17 '19 at 09:06
  • I am not sure about that... from cx_freeze docs: *cx_Freeze normally produces a folder containing an executable file for your program, along with the shared libraries (DLLs or .so files) needed to run it.* – Francesco Pegoraro Apr 17 '19 at 09:24
  • 1
    That sounds like it would satisfy the requirement: https://github.com/qt/qt/blob/4.8/LICENSE.LGPLv3#L117-L122. Of course the only way to know for sure is to lawyer up, and even then you don't know until you have been sued for copyright infringement and see if you win or not. But what you can do if you're concerned is to compile a version of Qt with some conspicuous change and insert after the fact in order to demonstrate that yes, you can indeed as a user exercise your right granted by clause 4(d) of the LGPLv3. – Salvatore Shiggerino Apr 17 '19 at 09:44
  • While Qt can be used, with the exception of a few modules, under the LGPL, **PyQt** is GPL licensed. – Karl Bielefeldt Apr 17 '19 at 14:51