macOS showing modal that Qt app is interrumpting logout for some seconds
-
Hi,
I'm currently developing an app for macOS, using Qt 6.X the app is started on boot and will be running till is the user logs off, shutdown or restart the app.
The issue is that a macOS is show this pop up whenever the current user session is being closed, was reviewing if I'm doing wrong on exit but just in case I compile and run on release the Hello tr() Example of Qt Creator, that is the more simplest one and still is showing the popup for a few ms.

I removed to Qtranslator part and simplified it to minimal expression.
#include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello world!"); hello.resize(100, 30); hello.show(); return app.exec(); }Can anyone help me with this? Thanks in advance.
-
Hi,
I'm currently developing an app for macOS, using Qt 6.X the app is started on boot and will be running till is the user logs off, shutdown or restart the app.
The issue is that a macOS is show this pop up whenever the current user session is being closed, was reviewing if I'm doing wrong on exit but just in case I compile and run on release the Hello tr() Example of Qt Creator, that is the more simplest one and still is showing the popup for a few ms.

I removed to Qtranslator part and simplified it to minimal expression.
#include <QApplication> #include <QPushButton> int main(int argc, char *argv[]) { QApplication app(argc, argv); QPushButton hello("Hello world!"); hello.resize(100, 30); hello.show(); return app.exec(); }Can anyone help me with this? Thanks in advance.
Hi and welcome to devnet,
You are calling exec twice on your app object.
-
@SGaist Hi, sorry the code was pasted wrong, is respecting the example and is only called once. I had fixed it on main post.
Actually doing a test Qt Creator app itself is showing this popup too.
Which version of Qt are you building your application with ?
On which version of macOS ? -
Last macOS version 13.3.1, and I've tested this on Qt6.3, 6.4 and finally with Qt6.5 too.
I have an M1, 2020 but this is happening on other macs too.You can open Qt Creator, try log out and the message will flash for some ms.
-
Last macOS version 13.3.1, and I've tested this on Qt6.3, 6.4 and finally with Qt6.5 too.
I have an M1, 2020 but this is happening on other macs too.You can open Qt Creator, try log out and the message will flash for some ms.
@xarli Does the interruption only occur when you are running the example from Qt Creator?
I can confirm your problem when I am running the example from CLion (I don't use Qt Creator). However, I cannot confirm your described behaviour if the example is run outside of CLion. With CLion, running the example causes the display of a modal dialog from CLion which - correctly - terminates the shutdown sequence with the macOS interrupted dialog. -
@DerReisende No, Im testing the HelloWorld app compiled on release and executed outside Creator.
The strange situation is that I can reproduce this on my app distributed to final users, Qt Creator app itself, and even on the OBS Studio application that I know that uses Qt too.

Maybe is related with the main event loop hanging somehow some ms/secs I don't know, but I think that this can be perceived as a bug for the user and for sure is a bug for me.