How to display a specific pop-up window and then proceed with an internal procedure
-
Standard_MeasureDataReceive* rcvData = nullptr; this->connect(this, &wStandardCurve::UserDefine_ReceiveData, [&](Standard_MeasureDataReceive data) { rcvData = new Standard_MeasureDataReceive(); rcvData = static_cast<Standard_MeasureDataReceive*>(&data); }); m_pExcuteDlg->Show(999999, true); switch (m_pStcInfo->nMesType) { case 0: // lamda 1 { cGlobalParam::SendMeasureCellSetting(CellTypes::Single, (MultiCellTypes)m_pStcInfo->iCellNumber); //for (int nCnt = 1; nCnt <= m_pDataModel->rowCount(); nCnt++) for (int group = 1; group <= nGroupCnt; group++) { // [ 샘플을 넣으세요 Msg 출력] { wMessageBox msg(QString::fromLocal8Bit("샘플을 삽입하십시오"), this); } cGlobalParam::SendMeasureStart(ModeTypes::StandardCurve); if (data) { float fa = data->ABS; float ft = data->Trans; } } }
m_pExcuteDlg is a pop-up window.
After popping up this ui, a specific event is handled and processed as a lambda.
Afterwards, I would like to proceed with the procedure of the swich case.I would like to proceed with the procedure with the popup still displayed.
I don't want to use goto.
-
@IknowQT said in How to display a specific pop-up window and then proceed with an internal procedure:
this->exec();
So, it is blocking (exec() is blocking).
Change its implementation so it is non-blocking (use show() instead of exec()) or provide a second non-blocking implementation. -
@IknowQT Please provide more information!
What is m_pExcuteDlg?
What does Show() do exactly?
You can show a dialog in a non-blocking way calling show() on it, but from the information you gave it is completelly unclear what your "ui" is actually doing... -
m_pExcuteDlg is a ui class with a progress bar.
After ui show with a progress bar, when data comes in to the lambda, I want to go into the switch statement and proceed with the next step.Unless I call the exit function on the progress bar, the progress bar ui should remain popped up.
-
void wBusyDialog::Show(int msec, bool bSingle=false) { if (m_pTimer) { m_pTimer->start(msec); this->exec(); } } void wBusyDialog::Hide() { if (m_pTimer) { m_pTimer->stop(); this->close(); } } this->connect(this->m_pTimer, &QTimer::timeout, [=]() { //m_pTimer->stop(); this->Hide(); });
Sorry I didn't understand what you meant.
-
@IknowQT said in How to display a specific pop-up window and then proceed with an internal procedure:
this->exec();
So, it is blocking (exec() is blocking).
Change its implementation so it is non-blocking (use show() instead of exec()) or provide a second non-blocking implementation. -
@IknowQT said in How to display a specific pop-up window and then proceed with an internal procedure:
Can I see an example of a non-blocking implementation?
What example do you need to show how to call show()?
void wBusyDialog::Show(int msec, bool bSingle=false) { this->show(); }