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. QML finish sizing object event
Forum Update on Monday, May 27th 2025

QML finish sizing object event

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 1.1k 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.
  • M Offline
    M Offline
    MajidKamali
    wrote on 23 May 2016, 11:22 last edited by
    #1

    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 :-)

    P 1 Reply Last reply 23 May 2016, 11:27
    0
    • M MajidKamali
      23 May 2016, 11:22

      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 :-)

      P Offline
      P Offline
      p3c0
      Moderators
      wrote on 23 May 2016, 11:27 last edited by
      #2

      @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 23 May 2016, 12:46
      0
      • P p3c0
        23 May 2016, 11:27

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

        M Offline
        M Offline
        MajidKamali
        wrote on 23 May 2016, 12:46 last edited by MajidKamali
        #3

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

        P 1 Reply Last reply 24 May 2016, 05:32
        0
        • M MajidKamali
          23 May 2016, 12:46

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

          P Offline
          P Offline
          p3c0
          Moderators
          wrote on 24 May 2016, 05:32 last edited by
          #4

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

          1/4

          23 May 2016, 11:22

          • Login

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