Solved Class Object Creation at compile time
-
Hi,
Currently I am parsing an XML file in a QQmlPropertyMap variable during runtime. Can the XML file be parsed during the compile time and the Map be loaded with values during the compile time?
-
Hi,
No, you need a code generator that will create whatever classes you need from your xml data before building your application. A bit like uic does for the .ui files.
-
@SGaist
Oh... ohkkk thank you...
One more question in this regard, Is it possible for running an application during/before compiling the one more Qt application. Can the .pro file have a check to finish running a script/application before compilation of the application.Need for this: I can have an application that parses the XML file into a header file which can then be used in the main application. This reduces the time and effort of parsing the XML file during run time?
-
@Anita See https://doc.qt.io/qt-5/qmake-advanced-usage.html "Adding Custom Targets"