Can I use Qt LGPL license and sell my application without any kind of restrictions?

47,569

Just dynamically link to Qt. If you dynamically link to LGPL libraries, there's nothing to worry about.

If you statically link to them, you can just distribute your object files (not your source code), and you'll be fine.

The idea of the LGPL is that the end user has to be able to replace the LGPL library with a version they want. Dynamically linking to the LGPL library lets you do that, as does statically linking and distributing your object files. So long as you do this, you can sell your closed source program all you want.

Of course, there's more to the LGPL than just this, but that's the relevant part.

Share:
47,569
Hossein
Author by

Hossein

For the love of God, do not downvote new comers! help them kindly so they can feel a apart of this community!

Updated on October 28, 2020

Comments

  • Hossein
    Hossein over 3 years

    I want to start a cross-platform project. I had my researches and now I am almost certain Qt is the right deal. There is a big obstacle here though: licensing.

    I want to sell my project and I also don't want to give out any source related to my work or pay for a license. I checked and noticed Qt offers both commercial and open source solutions. I have heard too many conflicting sayings on Qt licensing which confused me a lot. Some say that even if I use LGPL version of Qt, I still need to submit my code. Is this true?

    Can someone give me a simple explanation on Qt licenses and tell me if I can sell my application without any kind of restrictions at all or not? Would anyone tell me any other equivalents to Qt for cross-platform development without any restrictions?

  • Josh Kelley
    Josh Kelley over 11 years
    The LGPL also requires that you "do not restrict modification of the portions of the Library contained in the Combined Work and reverse engineering for debugging such modifications," which may conflict with some commercial EULAs' prohibitions on reverse engineering.
  • Hossein
    Hossein over 11 years
    Thank you very much.So basically this means that i eaither have to release my dlls? or .lib files to the public in order to be able to sell my application? If that is the case , then whats the point in selling my application! my competitors will use my work ( as dll or .lib ) and use it for their own!Is it not that bad?
  • cmannett85
    cmannett85 over 11 years
    @Hossein Did you even read the answer? This has nothing to do with your code. Qt's LGPL license relates to Qt and Qt only, so you can package your code and license it however you like, but unless you plan on buying a Qt commercial license, you have to dynamically link to Qt. Qt's commercial license is for when you wish to modify Qt's source code, and not release the changes you have made to the public.
  • Hossein
    Hossein over 11 years
    @cbamber85:So it doesnt mean that when i want to use a LGPL library or file,I have to make my work LGPL in regards to it as well?And All in all i will be fine as far as i have not changed any Qt library right?:)
  • Cornstalks
    Cornstalks over 11 years
    @Hossein: And as long as you dynamically link to Qt. Honestly, you should just get a lawyer. You should always talk to one before engaging in a commercial venture. And FWIW, IANAL.
  • Петър Петров
    Петър Петров over 9 years
    @Hossein, Users should be able te reverse engineer and completely replace Qt itself. However, this means that you should NOT prohibit reverse engineering. You have to distribute Qt as DLLs.... and for a bonus, your app's Object files (not mandatory). If you CARE about your object files, you should then also care about your EXE! Because for a guy that knows how to use Object files, he also knows what EXACTLY is an EXE! Thse people tend to care about low-level stuff, and they know far more than us. For them, even your EXE may be as readable as your source code to you :P
  • Cornstalks
    Cornstalks over 9 years
    @ПетърПетров Yes, reverse engineering is a real concern when using LGPL libraries. However, executables are usually much more difficult to reverse engineer than a bunch of object files (namely because executables are usually stripped, have link-time optimizations and inlining applied, etc.). But you're absolutely right: if you aren't careful about how you build your executable, it might be just as easy to reverse engineer as all your object files.
  • Петър Петров
    Петър Петров over 9 years
    That's why DLLs alone suffice in 99% of time.
  • camino
    camino over 5 years
    @Cornstalks Great answer! one question, why statically link is allowed? We can check whether QT source code is modified by, for example, md5 qt5core.dll. But if it is statically linked, how can we know QT code is modified or not?
  • camino
    camino over 5 years
    You can use QT for free if you don't modify QT's source code, right?