Hello Community,

In one of pyqgis app built in QGIS 2.18 I have a waiting message to let know 
the user to wait until a project opens.
I simplified the process in the following scrip:

from qgis.PyQt import QtWidgets
message = "Wait to open the airspace project..."
msg = QtWidgets.QMessageBox()
msg.setText(message)
msg.show()
qgis.utils.iface.messageBar().pushMessage("Wait", message)

for i in range(1000):
    print(i)
qgis.utils.iface.messageBar().pushMessage("Done", "The process is done")
msg.setText("The process is done")

When I run the script as is in QGIS 2.18 the message "Wait to open the airspace 
project..." is displayed on both message bar and QMessageBox.
Then the loop starts and it display the i.
And at the end the message "The process is done" is displayed in both message 
bar and QMessageBox.

If I run the same scrip in 3.22.8-Białowieża, the loop starts and no wait 
message is displayed.
The QMessageBox is somehow displayed without any message.
After the loop is done "The process is done" is displayed in both pushed bar 
and QMessageBox.
What is strange "The process is done" disappear from the pushed bar and "Wait 
to open the airspace project..." is displayed.
So this behavior is useless for the user.
Is anyway hot to make QGIS 3.22 to display these messages in the proper 
sequence as they used to be displayed in QGIS 2.18.

I hope you can access the video at this link. I explained the behavior and you 
can see it

https://drive.google.com/file/d/1tQNP6nBRL0tAS4bl_2i5heHz7viwCCAv/view?usp=sharing

________________________________

This electronic message, as well as any transmitted files included in the 
electronic message, may contain privileged or confidential information and is 
intended solely for the use of the individual(s) or entity to which it is 
addressed. If you have received this electronic message in error please notify 
the sender immediately and delete the electronic message. Any unauthorized 
copying, disclosure or distribution of the electronic message is strictly 
forbidden. NAV CANADA accepts no liability for any damage caused by any virus 
and/or other malicious code transmitted by this electronic communication.

Le présent message électronique et tout fichier qui peut y etre joint peuvent 
contenir des renseignements privilégiés ou confidentiels destinés a l'usage 
exclusif des personnes ou des organismes a qui ils s'adressent. Si vous avez 
reçu ce message électronique par erreur, veuillez en informer l'expéditeur 
immédiatement et supprimez le. Toute reproduction, divulgation ou distribution 
du présent message électronique est strictement interdite. NAV CANADA n'assume 
aucune responsabilité en cas de dommage causé par tout virus ou autre programme 
malveillant transmis par ce message électronique.
_______________________________________________
Qgis-user mailing list
Qgis-user@lists.osgeo.org
List info: https://lists.osgeo.org/mailman/listinfo/qgis-user
Unsubscribe: https://lists.osgeo.org/mailman/listinfo/qgis-user

Reply via email to