Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Class Object Creation at compile time

Class Object Creation at compile time

Scheduled Pinned Locked Moved Solved QML and Qt Quick
4 Posts 3 Posters 395 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    Anita
    wrote on last edited by
    #1

    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?

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      A 1 Reply Last reply
      0
      • SGaistS SGaist

        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.

        A Offline
        A Offline
        Anita
        wrote on last edited by
        #3

        @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?

        jsulmJ 1 Reply Last reply
        0
        • A Anita

          @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?

          jsulmJ Offline
          jsulmJ Offline
          jsulm
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Anita See https://doc.qt.io/qt-5/qmake-advanced-usage.html "Adding Custom Targets"

          https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1

          • Login

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Users
          • Groups
          • Search
          • Get Qt Extensions
          • Unsolved