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. Ensure property initialization order of QML item
Qt 6.11 is out! See what's new in the release blog

Ensure property initialization order of QML item

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 287 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.
  • C Offline
    C Offline
    Creaperdown
    wrote on last edited by
    #1

    Hey, I have a custom qml item that is initialized when a certain property is initialized, so I have

    Page
    {
        id: page
        document: somewhere.myDocument
    }
    

    And after that, the page is ready to use, since the c++ functions backing it (e.g. implicitWidth) are relying on document to exist. Is there any way to enforce document being initialized first, before any of the page functionality is called?

    1 Reply Last reply
    0

    • Login

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