int main(int argc, char *argv[])
{
LSA listenagain;
QObject::connect(&a,
SIGNAL(aboutToQuit
()),
&listenagain,
SLOT(aboutToQuit
()));
listenagain.start();
return a.exec();
}
int main(int argc, char *argv[])
{
QCoreApplication a(argc, argv);
LSA listenagain;
QObject::connect(&a, SIGNAL(aboutToQuit()), &listenagain, SLOT(aboutToQuit()));
listenagain.start();
return a.exec();
}
To copy to clipboard, switch view to plain text mode
showRecord * record = new showRecord(showName, fileName, startHour, startMin, endHour, endMin);
record->moveToThread(thread);
connect(record,
SIGNAL(error
(QString)),
this,
SLOT(errorString
(QString)));
connect(thread, SIGNAL(started()), record, SLOT(process()));
connect(record, SIGNAL(finished()), record, SLOT(deleteLater()));
connect(record, SIGNAL(finished()), thread, SLOT(quit()));
connect(this, SIGNAL(shuttingDown()), record, SLOT(stopRecording()));
thread->start();
QThread* thread = new QThread;
showRecord * record = new showRecord(showName, fileName, startHour, startMin, endHour, endMin);
record->moveToThread(thread);
connect(record, SIGNAL(error(QString)), this, SLOT(errorString(QString)));
connect(thread, SIGNAL(started()), record, SLOT(process()));
connect(record, SIGNAL(finished()), record, SLOT(deleteLater()));
connect(record, SIGNAL(finished()), thread, SLOT(quit()));
connect(this, SIGNAL(shuttingDown()), record, SLOT(stopRecording()));
thread->start();
To copy to clipboard, switch view to plain text mode
void LSA::aboutToQuit() {
emit shuttingDown();
m_timer.stop();
}
void LSA::aboutToQuit() {
emit shuttingDown();
m_timer.stop();
}
To copy to clipboard, switch view to plain text mode
Bookmarks