When we write the QT development interface program, we often use the code of each module or the QML file to separate, so as not to qml too many files and look a bit messy
Below, let's take a look at:
We write each module separately in a. pri file
, and then we include them in the. Pro file
Include ($ $PWD/.. /.. /.. /BASE/BASE.PRI)
Include ($ $PWD/.. /.. /CAPB.PRI)
Two. pri files are two different modules one is the interface, and the other is the data
The content of one of them is posted below;
HEADERS + = $ $PWD/appctrl/appsettings.hxx \
$ $PWD/common/utabdiag.hxx \
$ $PWD/common/utabsys.hxx \
$ $PWD/common/regbaseitem_api.hxx \
$ $PWD/common/utabdef.h \
$ $PWD/common/utabdiaglocal.h \
$ $PWD /common/version.h \
$ $PWD/viewmodel/actstatenotifier.hxx \
SOURCES + $ $PWD/appctrl/appsettings.cxx \
$ $PWD/common/utabdiagimpl.c \
$ $PWD/common/regbaseitem_api.cxx \
$ $PWD/common/utabdiag.cxx \
$ $PWD /COMMON/UTABSYS.CXX \
$ $PWD/viewmodel/actstatenotifier.cxx \
Win32 {
Rc_file + $ $PWD/resource/ Mainres.rc
}
include ($ $PWD/third-part/qxview/qxview.pri )
include ($ $PWD/third-part/utabdev /UTABDEV.PRI)
include ($ $PWD/third-part/scipack/mkspecs/qmake_subdir/scipack.pri)
Take a look at the back.
Include ($ $PWD/third-part/qxview/qxview.pri)
Include ($ $PWD/third-part/utabdev/utabdev.pri)
Include ($ $PWD/third-part/scipack/mkspecs/qmake_subdir/scipack.pri)
We've got a couple of modules here.
Finally we put out the effect;