QDialog::exec在3次调用后做出反应
QDialog::exec react after 3 calls
我正在使用一个自定义对话框,我通过调用:
来显示它this->numberPick.move(point);
this->numberPick.setWindowFlags(Qt::SplashScreen);
this->numberPick.setParent(this);
this->numberPick.setModal(true);
this->numberPick.exec();
在void MainWindow::on_boardView_clicked(const QModelIndex &index){}
中调用所有这些代码(从QTableView
中单击事件)。
这个问题很奇怪。我需要点击我的按钮3次对话框显示。第二次点击Qt Creator给我警告像这样的"QDialog::exec: Recursive call detected"
。
我还没有解决这个问题,但我做了一个小的解决方案,它的工作原理是这样的:
this->numberPick = new NumberPick(this);
this->numberPick->setCell(cell);
this->numberPick->move(point);
this->numberPick->setWindowFlags(Qt::SplashScreen);
this->numberPick->exec();
delete this->numberPick;
但问题仍未解决
相关文章:
- 什么时候调用组成单元对象的析构函数
- 对RValue对象调用的LValue ref限定成员函数
- 为什么使用 "this" 指针调用派生成员函数?
- 函数调用中参数的顺序重要吗
- 使用 exec() 系统调用后如何循环回 main()?
- 使用CreateProcess尽可能使用单个命令参数调用exec*函数
- 在c++中使用popen调用cli实用程序时崩溃.适用于shell或fork、exec等
- 关闭Qt控制台应用程序会终止exec()调用中的进程,并且无法从main()扩展到范围
- 在QDialog::exec()之后调用QApplication::exec.()
- 从 boost::p ython::exec( 任何内容)调用时崩溃
- 是否可以在不调用 QApplication::exec() 的情况下创建本地事件循环
- app.exec() 不能调用其他方法(static lib Qt)
- 如何在linux中使用c或c++在不使用system()或exec()函数的情况下调用像pwd或ls-l这样的系统函数
- C++-在代码块中使用系统调用(fork、exec、wait等)
- 在插槽中调用QDialog::exec是否会阻塞主事件循环
- Qt:调用QEventLoop::exec后死锁
- 如何在c++中对exec()进行析构函数友好的调用
- QDialog::exec在3次调用后做出反应
- QEventLoop已经调用了exec(),甚至在exit()之前
- 在调用exec之前,更新Qt映像不起作用