Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Update: Forum Guidelines & Code of Conduct


    Qt World Summit: Early-Bird Tickets

    Unsolved QML finish sizing object event

    QML and Qt Quick
    2
    4
    784
    Loading More Posts
    • 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.
    • M
      MajidKamali last edited by

      Hi.
      Is there any handler for show or resize completed or some similar event?
      I want to send positions and rectangles of some items in window when page is shown to another QML file, but when I use Component.onCompleted handler of root object for that, I get zero width or height of child items

      Thanks :-)

      p3c0 1 Reply Last reply Reply Quote 0
      • p3c0
        p3c0 Moderators @MajidKamali last edited by

        @MajidKamali In QML each property has its corresponding signal handler. so you have onWidthChanged and onHeightChanged handlers to detect size changes.

        157

        M 1 Reply Last reply Reply Quote 0
        • M
          MajidKamali @p3c0 last edited by MajidKamali

          @p3c0 There isn't any signal when page or Item is ready for showing? (When all Items have there real width, height and position)

          p3c0 1 Reply Last reply Reply Quote 0
          • p3c0
            p3c0 Moderators @MajidKamali last edited by

            @MajidKamali As per the doc the order of running the onCompleted handlers is undefined. So as I understand from it there's no such way to find out whether the page is fully loaded and that all its children are comepletely intialized.
            But I think you should try putting completed handler inside a particular child.

            157

            1 Reply Last reply Reply Quote 0
            • First post
              Last post