Making Qt Systems Comply To LGPL Version 3

Burkhard Stubert

Many companies shy away from using Qt under the “difficult and dangerous” LGPLv3. Instead, they pay per-developer and per-unit fees every year. Is this a good decision? It depends. I’ll explain step by step how to comply to LGPLv3 and discuss when to use Qt under LGPLv3 and when Qt Commercial.

The hardest and most instructive cases for LGPLv3 compliance are Qt embedded systems. A Qt embedded system typically runs one or more Qt applications on a Linux system custom-built with Yocto. It consists of hundreds of packages under dozens of different licenses like GPL, LGPL, MIT, BSD and Commercial, which come in different variants. You must ensure that all these packages comply with their licenses. The Qt libraries are just a fraction of these packages. However, they come under a complicated FOSS license: LGPLv3.

Fully understanding the obligations of LGPLv3 is essential in deciding whether to use Qt under LGPLv3 or Qt Commercial. That’s why I’ll give a step-by-step guide for LGPLv3 compliance in the first part of my talk. Yocto and tools like Fossology make your life easier. In the second part, I’ll discuss the pros and cons of each license type with respect to cost, features and anti-tivoisation.

Once you understand (L)GPLv3 compliance for Qt embedded systems, compliance for other systems like desktops and phones becomes easy.

Step-By-Step Guide for LGPLv3 Compliance Normally, you provide Qt applications in binary form on products (e.g., an infotainment system) and link Qt dynamically. Then, LGPLv3 imposes the following duties on you.

  • Provide, to your users, the source code of all Qt modules used by the Qt applications. Yocto has a flag to collect the (modified) source code of all Linux packages in one place. You must highlight source modifications prominently.
  • Run a license and copyright scanner like Fossology over all the sources. The result is a database of licenses and copyright notices, which must be created for the first release and updated for further releases.
  • For each Qt module, decide which license to use. Most Qt modules offer three licenses: Commercial, GPLv3 and LGPLv3. Examples often are under MIT oder BSD licenses, unit tests under GPL. Include the text of the chosen license and the copyright notices with the sources of the module.
  • Provide an SDK and a detailed description to build Qt for your product. The SDK includes a compiler toolchain (often for cross-compilation), Qt libraries, other libraries and headers. Yocto provides the recipe meta-toolchain-qt5 to build the SDK.
  • Provide a way to install the Qt libraries on your product. For example, the user could pack together all Qt libraries in a tarball, put the tarball on a USB drive, and unpack the tarball on the product through a dedicated GUI action.
  • If your Qt applications have a user interface, you must also provide a screen in the product’s GUI, which lists all the Qt modules with their licenses and copyright notices.

Don’t forget to check that all the libraries, on which the Qt libraries depend, are compatible with LGPLv3. This is your responsibility.

When to Use Qt under LGPLv3 and When Qt Commercial Cost certainly plays a role in this decision. For Qt Commercial, you pay per-developer and per-unit fees every year. There are no such fees for Qt under LGPLv3. The costs for the compliance checks are roughly the same, because you have an SDK, a way to install Qt and other packages on your product, and detailed documentation internally anyway. LGPLv3 only obligates you to make this information public.

Allowing users to install modified Qt libraries on their products scares some companies away from Qt under LGPLv3. You don’t have to provide support service, warranty or updates, when users install modified Qt libraries on your product. You can also perform a technical review of the modified Qt libraries, before users are allowed to install them. So, you have some options to mitigate this risk.

Some features like Qt for Automation or Qt Virtual Keyboard are only available for Qt Commercial. You could also implement such features yourself or find another FOSS implementation.

In the end, it boils down to a cost-benefit analysis between Qt Commercial and Qt under LGPLv3. This analysis will differ from product to product and from company to company. I have advised several automotive, home-appliance and agricultural OEMs on licensing. Some chose Qt under LGPLv3 and some Qt Commercial despite millions of Euros in license fees. All of them had good reasons for their decisions.

track icon Nettuno
duration icon 60 min
language icon English
level icon Beginner