Using Qt.callLater ?
-
https://doc.qt.io/qt-5/qml-qtqml-qt.html#callLater-method
What is your criteria for "safe"?
-
Hi @fcarney,
So in My application there are multiple UI updates that happen, so when i want to open a page(Like a Menu), i would like to open the Menu, Just by loading the Title Bar first and the contents of the Menu just after, without any visible Glitch.
So i would load the TitleBar and on the component.oncompleted of the TitleBar, i would perform a callLater for the contents of the same.
So my question is : When i write callLater to load the contents of the page under the Title bar, will it occur immediately after the titlebar or will the operation be puushed to the end of the Events queue, due to which i could possibly see a visible delay? Currently in my application i do not see any delay, but in case of long runs/ heavy operations , is it possible that there might be a delay?
-
Hi @fcarney ,
Yes I will check the same . Thank you for the Input.No Actually I am loading another qml on the completion of the load of a titlebar page.
So My QMl looks like :
Menu.qml{
Rectangle{
id:titleRect
.
.
Text{
.
.
.
}
}
Loader{
id:loadId
anchors.top : titleRect.bottom}
function setSource()
{
loadId.source = "Menu_Page1.qml"
}
Component.onCompleted:{
Qt.callLater(setSource)
}
}@fcarney : Thanks for your inputs. :)