feat: add login by enter and return button

This commit is contained in:
semenov
2024-09-30 12:41:23 +03:00
parent b098c32f14
commit 63df783cc0
7 changed files with 18 additions and 0 deletions

View File

@@ -394,6 +394,17 @@ void MainWindow::checkUpdate()
ui->inlineTextDebug->setText(tr("Проверка обновлений..."));
}
void MainWindow::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Enter || event->key() == Qt::Key_Return)
{
if (ui->loginInputField->text().length() <= 0 || ui->passwordInputField->text() <= 0) return;
on_loginButton_clicked();
}
}
void MainWindow::painting()
{
// QPixmap background(":/resource/SSJ-100.jpg");