Reputation: 957
Is it possible to build Qt-project without QML ? For example, for building project without GUI we should use key -no-gui
? What about QML ? Thanks.
Upvotes: 2
Views: 817
Reputation: 5207
Your project only needs to depend on Qt modules that it actually needs.
In a QMake project file, for example. this is handled via the QT
variable.
E.g. to use the QtNetwork module one would do this
QT += network
By default the core
and gui
modules are enabled, to remove the gui
module do this
QT -= gui
The mechanism knows about module inter-dependencies, for example qml
depends on core
and network
so
QT += qml
results in core
, gui
, network
and qml
being selected.
Since qml
does not depend on gui
that could still be removed
QT += qml
QT -= gui
resulting in core
, network
and qml
Obviously, if you where to select qtquick
, then this would also imply gui
as qtquick
depends on gui
and qml
Upvotes: 5