Originally Posted by
Lykurg
I tried connecting that signal but the slot AboutToQuit() doesn't get called (breakpoint doesn't get hit):
int main(int argc, char *argv[])
{
MsDbServer server;
QObject::connect(&qtApp,
SIGNAL(aboutToQuit
()),
&server,
SLOT(AboutToQuit
()));
return qtApp.exec();
}
int main(int argc, char *argv[])
{
QCoreApplication qtApp(argc, argv);
MsDbServer server;
QObject::connect(&qtApp, SIGNAL(aboutToQuit()), &server, SLOT(AboutToQuit()));
return qtApp.exec();
}
To copy to clipboard, switch view to plain text mode
{
Q_OBJECT
public slots:
void AboutToQuit();
}
class MsDbServer : public QObject
{
Q_OBJECT
public slots:
void AboutToQuit();
}
To copy to clipboard, switch view to plain text mode
Bookmarks