本文整理汇总了C++中QEventLoop::disconnect方法的典型用法代码示例。如果您正苦于以下问题:C++ QEventLoop::disconnect方法的具体用法?C++ QEventLoop::disconnect怎么用?C++ QEventLoop::disconnect使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QEventLoop
的用法示例。
在下文中一共展示了QEventLoop::disconnect方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: inPort
void KPAOS4Checker::check()
{
QString inPort(Settings::get().getMidiInPort());
QString outPort(Settings::get().getMidiOutPort());
if(inPort.isEmpty() || outPort.isEmpty())
{
SettingsDialog settingsDialog(nullptr);
settingsDialog.exec();
inPort = Settings::get().getMidiInPort();
outPort = Settings::get().getMidiOutPort();
}
if(Midi::get().openPorts(inPort, outPort))
{
QEventLoop el;
el.connect(this, &KPAOS4Checker::stopLoop, &el, &QEventLoop::quit);
el.connect(&stompDelayObj, &Stomp::onOffReceived, this, &KPAOS4Checker::onOfReceived);
el.connect(mTimer, &QTimer::timeout, this, &KPAOS4Checker::timerTimeout);
mTimer->start(500);
stompDelayObj.requestOnOff();
el.exec();
el.disconnect(this, &KPAOS4Checker::stopLoop, &el, &QEventLoop::quit);
el.disconnect(&stompDelayObj, &Stomp::onOffReceived, this, &KPAOS4Checker::onOfReceived);
el.disconnect(mTimer, &QTimer::timeout, this, &KPAOS4Checker::timerTimeout);
}
}
示例2: waitForRequestFinished
// Wait for request to complete
bool QOrganizerItemRequestQueue::waitForRequestFinished(
QOrganizerAbstractRequest* req, int msecs)
{
// Verify that request exists in this manager
if (!m_abstractRequestMap.keys().contains(req))
return false;
// Verify that request is active
if (req->state() != QOrganizerAbstractRequest::ActiveState)
return false;
// Create an event loop
QEventLoop *loop = new QEventLoop(this);
// If request state changes quit the loop
QObject::connect(req, SIGNAL(stateChanged(QOrganizerAbstractRequest::State)), loop, SLOT(quit()));
// Set a timeout for the request
// NOTE: zero means wait forever
if (msecs > 0)
QTimer::singleShot(msecs, loop, SLOT(quit()));
// Start the loop
loop->exec();
loop->disconnect();
loop->deleteLater();
return (req->state() == QOrganizerAbstractRequest::FinishedState);
}
示例3: slotEnter
void Vkeybord::slotEnter()
{
m_lbWaitKeyIn->setText(ui->lineEdit->text());
qDebug()<<"parent name : "<<m_lbWaitKeyIn->parent()->objectName()<<" ,lb objname : "<<m_lbWaitKeyIn->objectName()<<" lbText: "<<m_lbWaitKeyIn->text();
ui->lineEdit->setText("");
m_ani->setStartValue(QPoint(0,0));
m_ani->setEndValue(QPoint(0,height()));
QEventLoop loop;
loop.connect(m_ani,SIGNAL(finished()),&loop,SLOT(quit()));
m_ani->start();
loop.exec();
hide();
loop.disconnect();
}