Fix error prompt bug.
This commit is contained in:
@@ -87,9 +87,15 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
layout->addWidget(tab);
|
layout->addWidget(tab);
|
||||||
ui->centralWidget->setLayout(layout);
|
ui->centralWidget->setLayout(layout);
|
||||||
this->setWindowFlags (Qt::Window);
|
this->setWindowFlags (Qt::Window);
|
||||||
connect(EventCenter::Default(),&EventCenter::GUIErrorRaise,[=](){
|
connect(EventCenter::Default(),&EventCenter::GUIErrorRaise,[=](QObject*,QObject* msg){
|
||||||
if (!msgDialog) msgDialog = new GUIMessageDialog(this);
|
if (!msgDialog) msgDialog = new GUIMessageDialog(this);
|
||||||
|
if (msg)
|
||||||
|
{
|
||||||
|
QString* str = (QString*)msg;
|
||||||
|
msgDialog->showMessage(*str);
|
||||||
|
} else {
|
||||||
msgDialog->showMessage("Something went error!");
|
msgDialog->showMessage("Something went error!");
|
||||||
|
}
|
||||||
msgDialog->showExitButton();
|
msgDialog->showExitButton();
|
||||||
msgDialog->stopLoading();
|
msgDialog->stopLoading();
|
||||||
msgDialog->showFullScreen();
|
msgDialog->showFullScreen();
|
||||||
|
|||||||
Reference in New Issue
Block a user