diff --git a/mainwindow.cpp b/mainwindow.cpp index a30b38b..a587a62 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -209,16 +209,21 @@ void MainWindow::onReplaceLast(QString text, QString suffix) { } Utils::printLineEditInfo(lines); - ui->updateStatus->setText(lines.join('\n').trimmed()); - ui->updateStatus->setEnabled(true); + scrollDownTextEdit(); } void MainWindow::onShowErrorMessage(QString title, QString text) { text = text.leftJustified(50, ' '); QMessageBox msgBox(QMessageBox::NoIcon, title, text, QMessageBox::Ok, - nullptr, Qt::FramelessWindowHint); + this, Qt::FramelessWindowHint); + msgBox.resize(100, 50); + + // msg.setStyleSheet("background-color: rgb(0, 0, 0);") + // msg.setStyleSheet("text-color: rgb(255, 255, 255);") + + msgBox.setStyleSheet("QMessageBox{border: 1px solid black; background-color:white}"); msgBox.setDefaultButton(QMessageBox::Ok); msgBox.defaultButton()->setVisible(false); @@ -227,6 +232,9 @@ void MainWindow::onShowErrorMessage(QString title, QString text) { t->setSingleShot(true); t->start(5 * 1000); + msgBox.show(); + msgBox.move(0, 0); + if(msgBox.exec() == QMessageBox::Ok) { // do something } else {