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. How do I know when all QML element propreties have been initialized ?

How do I know when all QML element propreties have been initialized ?

Scheduled Pinned Locked Moved QML and Qt Quick
6 Posts 3 Posters 1.5k Views 1 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
    aabc
    wrote on last edited by
    #1

    How do I know when all QML element propreties have been initialized ?

    1 Reply Last reply
    0
    • JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      The Component.onCompleted() signal handler will run when everything has been initialized. http://qt-project.org/doc/qt-5/qml-qtqml-component.html#onCompleted-signal

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      1 Reply Last reply
      0
      • O Offline
        O Offline
        onek24
        wrote on last edited by
        #3

        I would go for Component.onCompleted.
        @Rectangle {
        // ...
        Component.onCompleted: // Do something
        }@
        You can do this for your top-level component so it'll emit when your top-level component finished initializing.

        1 Reply Last reply
        0
        • A Offline
          A Offline
          aabc
          wrote on last edited by
          #4

          The problem is that in Qt 5 the Component.onCompleted is called before the properties which bind to other properties finished initialization

          1 Reply Last reply
          0
          • JKSHJ Offline
            JKSHJ Offline
            JKSH
            Moderators
            wrote on last edited by
            #5

            [quote author="aabc" date="1392562448"]The problem is that in Qt 5 the Component.onCompleted is called before the properties which bind to other properties finished initialization[/quote]Hmm... I'm not sure if there's a feature that does what you want (yet). This is probably a question for the "Interest mailing list":http://lists.qt-project.org/mailman/listinfo/interest... (subscribe and then send an email) -- you can find Qt's engineers on that list.

            Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

            1 Reply Last reply
            0
            • A Offline
              A Offline
              aabc
              wrote on last edited by
              #6

              Thanks JKSH

              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