I have a Qt app written against Qt 5.15.8. I have QML item declared on it. I know that following is a way I can figure out when my QML item is resized. Basically I get to know when width or height is changed.
Item {
id: my_item
property double dimensions: width * height
onDimensionsChanged: {
if(my_item.visible)
console.log("Dimension changed")
// Some heavy processing logic to run which I want to run if dimension change is complete.
}
}
Question:
Is there a way I can get to know when the width or height or dimension change is finished or stopped? Due to reasons internal to my code, I have to do a heavy processing when the size of my QML item changes. I want to trigger the heavy processing when the size change is finished. Is there a way to figure out when the size change is finished?
If Qt/QML does not have a built in event, smart C++ or QML tricks are also welcome for the answer?