[Interest] QML StackView: cannot push while already in the process of completing a push
Alexander Dyagilev
alervdvcw at gmail.com
Wed Jul 22 03:31:08 CEST 2020
Hello,
Qt 5.12.8, Android 10.
We're getting the subject message in app log when trying to push an item
in some occasions. And thus the item is not pushed.
Is it a bug? We've tried to use this custom component with no luck:
importQtQuick2.0
importQtQuick.Controls2.12
StackView
{
propertyvarqueue:[]
functionqueuedPush(item,properties,operation){
varpushedOk=false;
if(!isBusy())
{
if(push(item,properties,operation))
pushedOk=true;
}
if(!pushedOk)
{
console.log("queuingitem");
queue.push({i:item,p:properties,o:operation});
}
}
functionqueuedClear(){
queue=[];
clear();
}
functionisBusy(){
returnbusy||state==StackView.Deactivating||state==StackView.Activating;
}
functioncheckQueue(){
console.log("checkingqueue");
if(!isBusy()&&!queue.empty){
console.log("pushing...");
varitem=queue.shift();
push(item.i,item.p,item.o);
}
}
onBusyChanged:checkQueue()
onStateChanged:checkQueue()
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20200722/a08c8b93/attachment.html>
More information about the Interest
mailing list