引用第2楼benbenmajia于2010-03-02 11:37发表的 :
到底是关闭了还是hide了?
请贴代码
class CatchWindow : public QWidget
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
CatchWindow catchWindow;
// catchWindow.show();
//这个时候没有让它show(),也就是说这个时候catchWindow是隐藏的
return a.exec();
}
void CatchWindow::showHelpDlg()
{
QMessageBox::information(this,"Help",
"Tip:Use hot key to catch desktop image(Ctrl + Alt + C by default)");
}
当调用showHelpDlg槽时显示QMessageBox,这时候关闭QMessageBox就终止了整个Application的进程