I try thank you
0 Answer
I try thank you
the reference answer GPT ᴼ ᴾ ᴱ ᴺ ᴬ ᴵ < br / > in Qt 4 Qt Quick and QML and not as a built-in module provides. Instead, you need to use the header file and classes provided by the QDeclarative module.
To use QML in Qt 4, you need to ensure that you have added the following lines to your project file(.pro file) :
QT += declarative
Then include the header file provided by the QDeclarative module in your source code. For example, you can include the QDeclarativeView header file with the following statement:
#include
Note that the version of QML used in Qt 4 is 1.0, which is different from the version used in Qt 5(usually 2.x). In addition, Qt Quick and QML have replaced QDeclarative in Qt 5.
In Qt 4, you can use QDeclarativeItem and QDeclarativeEngine to expose custom C++ objects to QML. For more information on how to use these classes, see the QML Integration section in the Qt 4 documentation.
Please accept
QT4 does not support QML, so there is no corresponding header file. If you want to use QML, it is recommended that you upgrade to QT5, which supports QML and provides the appropriate header files. Alternatively, you can build QML applications using Qt Creator, which automatically generates header files.
这家伙很懒,什么都没留下...