ChatGPT解决这个技术问题 Extra ChatGPT

Unknown module(s) in QT: svg

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?

Ubuntu 13.10. How to check this?

L
László Papp

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*

oddly enough I did not see the dev packages in synaptic when I entered qt svg
In Fedora it is sudo dnf install qt5-qtsvg-devel.
Just doing sudo apt-get install libqt5svg5-dev resolves to all the dependencies needed by pgModeler.
@zerobandwidth This in Ubuntu 16.04
@lpapp how to install the module to a statically built version of Qt in Windows (see my post here stackoverflow.com/questions/54097920/…)
u
user1338062

Debian Stretch:

sudo apt install libqt5svg5-dev

Fedora (courtesy of @robin-green):

sudo dnf install qt5-qtsvg-devel

J
J. Wilde

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.