feat: search on return-press

This commit is contained in:
Michael Mandl 2024-03-21 20:56:30 +01:00
parent a6146415df
commit 7af6ac593c
Signed by: mandlm
GPG key ID: 4AA25D647AA54CC7
2 changed files with 7 additions and 0 deletions

View file

@ -159,3 +159,9 @@ void MainWindow::on_wordListSizeSelector_valueChanged(int) {
search(ui->searchInput->displayText()); search(ui->searchInput->displayText());
QGuiApplication::restoreOverrideCursor(); QGuiApplication::restoreOverrideCursor();
} }
void MainWindow::on_searchInput_returnPressed() {
QGuiApplication::setOverrideCursor(Qt::WaitCursor);
search(ui->searchInput->displayText());
QGuiApplication::restoreOverrideCursor();
}

View file

@ -43,6 +43,7 @@ private slots:
void on_searchAlgorithmSelector_currentIndexChanged(int); void on_searchAlgorithmSelector_currentIndexChanged(int);
void on_wordListSourceSelector_currentIndexChanged(int); void on_wordListSourceSelector_currentIndexChanged(int);
void on_wordListSizeSelector_valueChanged(int); void on_wordListSizeSelector_valueChanged(int);
void on_searchInput_returnPressed();
private: private:
Ui::MainWindow *ui; Ui::MainWindow *ui;