QGuiApplication::commitDataRequest not received with local Qt but received with system Qt
-
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 ?
-
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.