QThread* thread = new QThread; tmr = new QTimer(this); tmr->moveToThread(thread);
connect(tmr, &QTimer::timeout, this, &MainForm::updateByTimer, Qt::DirectConnection);
C++ (Qt)tmr = new QTimer;
QThread* newThread = new QThread(); myclass = new MyClass(); myclass->moveToThread(newThread); myclass->reload();
autoUpd5Act = new QAction(Resource::OPTIONS_AUTOUPDATE5, this); autoUpd5Act->setCheckable(true); autoUpd5Act->setStatusTip(Resource::STATUS_OPTIONS_AUTOUPDATE5); connect(autoUpd5Act, &QAction::triggered, m_tmr, [&](int) {m_tmr->sl_SetInterval(5000); });