From a3cc04fb2d4096c8a15fd335f4e58cd249bcd4c5 Mon Sep 17 00:00:00 2001 From: xarkes Date: Fri, 15 Dec 2017 17:20:25 +0100 Subject: [PATCH] Fix #143 Button focus --- src/dialogs/NewFileDialog.cpp | 5 +++++ src/dialogs/NewfileDialog.ui | 19 +++++++++++-------- 2 files changed, 16 insertions(+), 8 deletions(-) diff --git a/src/dialogs/NewFileDialog.cpp b/src/dialogs/NewFileDialog.cpp index a07e98d1..3bec5aed 100644 --- a/src/dialogs/NewFileDialog.cpp +++ b/src/dialogs/NewFileDialog.cpp @@ -8,6 +8,8 @@ #include #include #include +#include +#include const int NewFileDialog::MaxRecentFiles; @@ -85,6 +87,9 @@ NewFileDialog::NewFileDialog(QWidget *parent) : } ui->loadProjectButton->setEnabled(ui->projectsListWidget->currentItem() != nullptr); + + /* Set focus on the TextInput */ + ui->newFileEdit->setFocus(); } NewFileDialog::~NewFileDialog() {} diff --git a/src/dialogs/NewfileDialog.ui b/src/dialogs/NewfileDialog.ui index 682ac77d..1b392e58 100644 --- a/src/dialogs/NewfileDialog.ui +++ b/src/dialogs/NewfileDialog.ui @@ -236,6 +236,9 @@ Open + + true + @@ -401,13 +404,6 @@ 0 - - - - Close - - - @@ -428,6 +424,13 @@ + + + + Close + + + @@ -459,7 +462,7 @@ QSvgWidget QWidget -
qsvgwidget.h
+
QSvgWidget
1