QML finish sizing object event
-
wrote on 23 May 2016, 11:22 last edited by
Hi.
Is there any handler forshow
orresize 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 useComponent.onCompleted
handler of root object for that, I get zero width or height of child itemsThanks :-)
-
Hi.
Is there any handler forshow
orresize 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 useComponent.onCompleted
handler of root object for that, I get zero width or height of child itemsThanks :-)
@MajidKamali In QML each property has its corresponding signal handler. so you have
onWidthChanged
andonHeightChanged
handlers to detect size changes. -
@MajidKamali In QML each property has its corresponding signal handler. so you have
onWidthChanged
andonHeightChanged
handlers to detect size changes.wrote on 23 May 2016, 12:46 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 There isn't any signal when page or Item is ready for showing? (When all Items have there real width, height and position)
@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.
1/4