Qt5.12.2 QMessageBox can't be showed on IOS18.2
-
wrote on 14 Mar 2025, 09:42 last edited by
The following code can work correctly on IOS16.7:
void DIAG(QString text)
{
QMessageBox box;
box.setIcon(QMessageBox::NoIcon);
box.setText(text);
box.addButton(QObject::tr("OK"), QMessageBox::AcceptRole);
box.exec();
}But can't work on on IOS18.2!
For example, if I call DIAG function under QPushButton clicked slot, the messagebox can't show and will block the current UI(you can't click anything).
Now I let the APP goto background, and then reopen it, then I can see the messagebox(but still you can't click anything).How to fix this issue on IOS18.2?
Thanks! -
The following code can work correctly on IOS16.7:
void DIAG(QString text)
{
QMessageBox box;
box.setIcon(QMessageBox::NoIcon);
box.setText(text);
box.addButton(QObject::tr("OK"), QMessageBox::AcceptRole);
box.exec();
}But can't work on on IOS18.2!
For example, if I call DIAG function under QPushButton clicked slot, the messagebox can't show and will block the current UI(you can't click anything).
Now I let the APP goto background, and then reopen it, then I can see the messagebox(but still you can't click anything).How to fix this issue on IOS18.2?
Thanks!@iamnotsad You should consider switching to QML for mobile platforms. There is not much happening in QtWidgets and they are more for desktop systems.
-
Please also move to at least Qt 6.5.
5.12 isn't supported anymore. -
@iamnotsad You should consider switching to QML for mobile platforms. There is not much happening in QtWidgets and they are more for desktop systems.
wrote 29 days ago last edited by@jsulm Thanks for your reply!
I kown switch to QML is the best choice. But my raw APP
was based on QWidgets, it will take to long time to switch to QML...
I want to find a workround for this issue firstly.
And next step,we may consider switching to QML when we have resources. -
@jsulm Thanks for your reply!
I kown switch to QML is the best choice. But my raw APP
was based on QWidgets, it will take to long time to switch to QML...
I want to find a workround for this issue firstly.
And next step,we may consider switching to QML when we have resources.@iamnotsad Then you should at least use a more recent version of Qt - latest Qt5 or even better Qt6. Qt 5.12 isn't supported anymore for long time already.
-
@iamnotsad Then you should at least use a more recent version of Qt - latest Qt5 or even better Qt6. Qt 5.12 isn't supported anymore for long time already.
wrote 29 days ago last edited by@jsulm Yes,I am preparing to upgrade my APP to use Qt6.8. But I met the issue: https://forum.qt.io/topic/161366/qt6-8-2-qwidget-can-t-show-on-ios18-2
5/6