Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. General talk
  3. Announcements
  4. Blog Post about Creating QML Properties Dynamically at Runtime from C++
Forum Updated to NodeBB v4.3 + New Features

Blog Post about Creating QML Properties Dynamically at Runtime from C++

Scheduled Pinned Locked Moved Announcements
1 Posts 1 Posters 579 Views
  • 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.
  • strahlexS Offline
    strahlexS Offline
    strahlex
    wrote on last edited by
    #1

    Hello, fellow Qt Coders,

    I know this is not part of how the QML language is designed. But sometimes it useful to create QML properties at runtime. An example for such a need is, for example, the Qt SCXML state machine for QML, which relies on this feature.

    Since I could not find a good explanation on how to do this, I created a write-up for three possible approaches. Using QMetaObject is my favorite.

    https://machinekoder.com/creating-qml-properties-dynamically-runtime-c/

    Please let me know if I overlooked something.

    Cheers,
    Alex

    Feel free to check out my website machinekoder.com
    and my pet projects Intellicute and QtQuickVcp

    1 Reply Last reply
    3

    • Login

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