From 4ebdcf56a06684ded0aae203cc769604451b0532 Mon Sep 17 00:00:00 2001 From: Gerhard Hoffmann Date: Tue, 22 Aug 2023 12:21:17 +0200 Subject: [PATCH] Clear message before showing a new one. --- mainwindow.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mainwindow.cpp b/mainwindow.cpp index 9151fc1..21f73b4 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -224,6 +224,7 @@ void MainWindow::onReplaceLast(QString text, QString suffix) { } void MainWindow::onShowErrorMessage(QString title, QString text) { - this->statusBar()->showMessage( // timeout: 5000 - QString(title + ": " + text).leftJustified(80, ' '), 20000); + this->statusBar()->clearMessage(); + this->statusBar()->showMessage( // timeout: 10000 + QString(title + ": " + text).leftJustified(80, ' '), 10000); }