Add some changes to the message box (to be chenged anyways later).
This commit is contained in:
parent
56daa84a14
commit
bea8242d6f
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user