Did some testing with event filters on the main window. not used.

This commit is contained in:
Gerhard Hoffmann 2023-09-10 16:54:54 +02:00
parent 6dd8a8c6b3
commit 18378afdc5

View File

@ -131,9 +131,9 @@ MainWindow::MainWindow(hwinf *hw, Worker *worker, Update *update, QWidget *paren
lst << QString("APISM version : %1").arg(m_worker->apismVersion()).leftJustified(m_width-3); lst << QString("APISM version : %1").arg(m_worker->apismVersion()).leftJustified(m_width-3);
lst << QString("").leftJustified(m_width-3, '='); lst << QString("").leftJustified(m_width-3, '=');
ui->updateStatus->setText(lst.join('\n')); ui->updateStatus->setText(lst.join('\n'));
ui->updateStatus->setEnabled(true); ui->updateStatus->setEnabled(true);
// ui->updateStatus->installEventFilter(this);
m_startTimer = new QTimer(this); m_startTimer = new QTimer(this);
connect(m_startTimer, SIGNAL(timeout()), m_worker, SLOT(update())); connect(m_startTimer, SIGNAL(timeout()), m_worker, SLOT(update()));
@ -308,9 +308,18 @@ void MainWindow::onEnableExit() {
ui->exit->setEnabled(true); ui->exit->setEnabled(true);
} }
//bool MainWindow::eventFilter(QObject *obj, QEvent *ev) {
// if (obj == ui->updateStatus) {
// qCritical() << "REc. event for text edit" << ev->type();
// }
// return QMainWindow::eventFilter(obj, ev);
//}
void MainWindow::onRestartExitTimer() { void MainWindow::onRestartExitTimer() {
m_exitTimer->stop(); m_exitTimer->stop();
m_exitTimer->start(60 * 1000); m_exitTimer->start(60 * 1000);
// ui->updateStatus->blockSignals(true);
} }
void MainWindow::onQuit() { void MainWindow::onQuit() {