Qt World Summit: Register Today!

Licence question for Qt/Python/MPL2

  • I'm working on a python application which will be licenced under MPL 2.0 and have a question about what I need to do to comply with the Qt open source licence terms.

    The program will be an import/export/pre/post-processing book-keeping package that interfaces heavily with 3rd party commercial and open source engineering and data-visualization programs.
    For example the program will let you create a model of a car. It will then create a model of the and run that through a commercial analysis package. Finally it wil read the results and display them.

    The program has a GUI which will be made using Qt.

    • The python source-code of the program will be distributed under MPL 2.0
    • The program will work with the unmodified version of Qt as installed using conda or pip
    • Some of the functions of the program will only work if you have access to a commercial product (eg: import/export to commerical package X will only work if you actually have commercial package X). This is because the interfaces to these products are via an API which comes with package X.
    • Other functions of the program are fully usable without having those commercial products (eg: export to Blender, visualization with VTK)

    As I understand using python means that the Qt library will be dynamically linked. As the source-code is made available it is possible to replace the Qt part with library Y. So that should be ok.
    What I'm a bit concerned about it the coupling with commercial products. Without having access to the commercial products you could see my application as "crippled" as in that not all functionality is available.


  • While waiting for someone more knowledgeable than I to reply to your questions, you have not said, please confirm whether you are going to use the PyQt bindings to Qt or the PySide2 ones?

  • Lifetime Qt Champion


    Beside the precision asked by @JonB, that's a question you should ask a lawyer specialised in software licenses.

  • @JonB . I honestly had to look that up.
    I'm importing PyQt5 at the moment so that means I'm using PyQt5. But if needed I think I could switch to PySide2 if needed. Not doing anything fancy. Just a VTK viewport and a few buttons at this moment.

    I also have to clarify that I'm not going to release my application as an stand-alone application. It will just be a python package that people can download and use from python.

    I note that spyder (https://en.wikipedia.org/wiki/Spyder_(software)) is similar in set-up and is licensed under MIT.

  • @VirtualFloat
    That is why I asked. If you are using PyQt, and you are not choosing to pay for it from riverbank, are you aware that the license terms is GPL, not LGPL? That is more restrictive than the LGPL of Qt itself. Basically you are required to publish your source code. Just wanted to check you are aware, in addition to all your own questions above.

    If you moved to PySide2 then you would be back in LGPL territory.

  • Moderators

    @JonB said in Licence question for Qt/Python/MPL2:

    are you aware that the license terms is GPL, not LGPL?

    To clarify @JonB's point: If you use a GPL library, your app must also be released under the GPL. You can't release it under MPLv2. However, LGPL libraries allow you to release your app under MPLv2.

  • Thanks for bringing up the PyQt/PySide2 issue. I was completely unaware of that. I will switch to PySide2.

    So I now I have both Qt and PySide2 under LGPL.

    Then (https://en.wikipedia.org/wiki/GNU_Lesser_General_Public_License)
    LGPL allows the work to be linked with (in the case of a library, "used by") a non-(L)GPLed program, regardless of whether it is free software or proprietary software.[2] The non-(L)GPLed program can then be distributed under any terms if it is not a derivative work.

    And my package is not a derivative work:
    "A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License."

    And with making the full source code of my package available users would be free to reverse engineer anything anyways.

    So everything would be ok?

Log in to reply