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 Updated to NodeBB v4.3 + New Features

QML finish sizing object event

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
4 Posts 2 Posters 1.2k 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.
  • M Offline
    M Offline
    MajidKamali
    wrote on 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 :-)

    p3c0P 1 Reply Last reply
    0
    • M MajidKamali

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

      p3c0P Offline
      p3c0P Offline
      p3c0
      Moderators
      wrote on 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
      0
      • p3c0P p3c0

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

        p3c0P 1 Reply Last reply
        0
        • M 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)

          p3c0P Offline
          p3c0P Offline
          p3c0
          Moderators
          wrote on 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

          • Login

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