Hi, I started with C++ development recently, and I think I'm ready to start building GUIs for my apps.

I'm thinking about using Qt, since it is the most popular C++ GUI library, but the licensing is really confusing, and there isn't a lawyer nearby that understands software licensing who can explain this to me.

I will only use Qt (as it is) for the GUI, and won't change anything inside the library. So I'm basically just going to link parts of my app with Qt and won't mind if I must release my GUI as open source, but if I can keep it closed source, it will be better. I'm not going to be distributing apps immediately, but I'm planning to by the end of the year.

Do I need to purchase a commercial license, or can I just use it under LGPL?

Thanks

The "Lesser" General Public License means that you can use the library for any application (commercial or not, open-source or not) as long as all you do is link against the library's binaries (i.e. if you don't use the source files (only headers) and you don't modify components of the library or add new ones). So, yes, you can just use Qt under the LGPL license, no need for the commercial license. You would need to purchase the commercial license if you wished to add or modify the Qt library components themselves (and thus, recompile and redistribute the Qt binaries (.dll or .so files)), but not if you just use them.

Ah thanks! Problem solved. Cheers :)

If you need a "Don't worry licence" go for wxWidgets!

@ChaosKnight11:

Careful! Iirc the LGPL allows you to freely link to Qt dynamically.
So you have to either use the DLL(or *nix equivalent)-version of Qt or deliver your object files, so the user could link your program with another Version of Qt.

@ChaosKnight11:

Careful! Iirc the LGPL allows you to freely link to Qt dynamically.
So you have to either use the DLL(or *nix equivalent)-version of Qt or deliver your object files, so the user could link your program with another Version of Qt.

That is why I gave wxOption. Free to link shared static modify sources....full freedom!

Link dynamically? Maybe it will be safer to use wxWidgets... It's a pity, because Qt is a very attractive product... Thanks for the warning Caligulaminus.

>>Link dynamically?

Dynamic linking is the way all GUI tools are used, as far as I know. By default, if you are not modifying the core elements of Qt, and if you are using tools like Qt Creator or qmake, dynamic linking is the way it is done. So, don't worry about that aspect. If you are not using dynamic linking, you will know about because it will most likely involve recompiling Qt, which is not something that will go unnoticed.

Okay. So I can use Qt, I just can't change anything within the library itself and distribute my "updated" version of the library or static link the library in my app without buying a commercial license. But I can distribute the original library dlls with my app and place it in the same directory, correct?

Okay. So I can use Qt, I just can't change anything within the library itself and distribute my "updated" version of the library or static link the library in my app without buying a commercial license. But I can distribute the original library dlls with my app and place it in the same directory, correct?

I think the answer is yes....but I'm no lawayer ;)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.