Unknown module(s) in QT: svg

QtUbuntuQt CreatorQmakeQtsvg

Qt Problem Overview


Added QT += svg and I tried just QT += svg and greaterThan(QT_MAJOR_VERSION, 4): QT += svg to the .pro solution file and ran qmake from inside the QtCreator and got this error:

> error: Unknown module(s) in QT: svg

Any ideas?

Qt Solutions


Solution 1 - Qt

You are lacking the installation of the the QtSvg library. Try to install them on your Ubuntu 13.10 in the following way:

sudo apt-get install libqt5svg5*

Solution 2 - Qt

Debian Stretch:

sudo apt install libqt5svg5-dev

Fedora (courtesy of @robin-green):

sudo dnf install qt5-qtsvg-devel

Solution 3 - Qt

Because zsh complains to me about "no matches found" when using lpapp's answer, I would like to add here: On Debian Systems one can get the required library for release builds via:

sudo apt install libqt5svg5

and if one also wants to build a debug build one requires:

sudo apt install libqt5svg5-dev

additionally.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
Questionuser3191398View Question on Stackoverflow
Solution 1 - QtlpappView Answer on Stackoverflow
Solution 2 - Qtuser1338062View Answer on Stackoverflow
Solution 3 - QtJ. WildeView Answer on Stackoverflow