QGuiApplication::commitDataRequest not received with local Qt but received with system Qt
-
wrote on 29 Jun 2023, 10:34 last edited by
Hi,
I need to prevent Fedora 36 user session from closing, so I tried to connect to QGuiApplication::commitDataRequest signal and call cancel on the QSessionManager object.This do the trick :
Helper::Helper(QObject *parent) : QObject(parent) { connect(qApp, &QGuiApplication::commitDataRequest, this, &Helper::commitData); } void Helper::commitData(QSessionManager& manager) { manager.cancel(); }
But only if my code is compiled with the Qt installed on my system (Qt 5.15.10 - /usr/lib64/qt5/) and not with the Qt installed locally (Qt 5.15.2 - /home/<user>/Qt/...).
If I execute this code compiled with the Qt installed into my home, the commitDataRequest signal is never received.Any idea?
-
Hi,
I need to prevent Fedora 36 user session from closing, so I tried to connect to QGuiApplication::commitDataRequest signal and call cancel on the QSessionManager object.This do the trick :
Helper::Helper(QObject *parent) : QObject(parent) { connect(qApp, &QGuiApplication::commitDataRequest, this, &Helper::commitData); } void Helper::commitData(QSessionManager& manager) { manager.cancel(); }
But only if my code is compiled with the Qt installed on my system (Qt 5.15.10 - /usr/lib64/qt5/) and not with the Qt installed locally (Qt 5.15.2 - /home/<user>/Qt/...).
If I execute this code compiled with the Qt installed into my home, the commitDataRequest signal is never received.Any idea?
Hi and welcome to devnet,
Does it also happen if you use Qt 6 ?
-
wrote on 30 Jun 2023, 08:36 last edited by
Thanks @SGaist!
I installed Qt6 this morning (system and local) and yes I have the same behavior.
I receive QGuiApplication::commitDataRequest with system Qt6 but not with local Qt6...
-
wrote on 6 Jul 2023, 15:32 last edited by
Still blocked. Anyone knows how commitDataRequest works in the low-level code? I would like to understand why my system Qt and my local Qt have not the same behavior on the same code...
-
Still blocked. Anyone knows how commitDataRequest works in the low-level code? I would like to understand why my system Qt and my local Qt have not the same behavior on the same code...
@vlanquepin said in QGuiApplication::commitDataRequest not received with local Qt but received with system Qt:
Anyone knows how commitDataRequest works in the low-level code?
Qt is open-source.
I would guess it's coming from the platform integration plugin so it's either not built correctly in your local Qt or can not connect to your WM/DM.
1/5