5#include <QSessionManager>
22int main(
int argc,
char *argv[])
42 if (
manager.allowsInteraction()) {
46 tr(
"Save changes to document?"),
The QApplication class manages the GUI application's control flow and main settings.
static int exec()
Enters the main event loop and waits until exit() is called, then returns the value that was set to e...
void commitDataRequest(QSessionManager &sessionManager)
static void setDesktopSettingsAware(bool on)
Sets whether Qt should use the system's standard colors, fonts, etc., to on.
static StandardButton warning(QWidget *parent, const QString &title, const QString &text, StandardButtons buttons=Ok, StandardButton defaultButton=NoButton)
QObject * parent() const
Returns a pointer to the parent object.
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
The QSessionManager class provides access to the session manager.
\macro QT_RESTRICTED_CAST_FROM_ASCII
MyMainWidget * mainWindow
MyMainWidget mySession(nullptr)
GLsizei const GLubyte * commands
QApplication app(argc, argv)
[0]
QNetworkAccessManager manager
void commitData(QSessionManager &manager)
QStringList restartCommand()
QStringList discardCommand()
MyMainWidget(QWidget *parent)
[0]
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent