Fix #143 Button focus

This commit is contained in:
xarkes 2017-12-15 17:20:25 +01:00
parent d92f016ead
commit a3cc04fb2d
2 changed files with 16 additions and 8 deletions

View File

@ -8,6 +8,8 @@
#include <QtGui>
#include <QMessageBox>
#include <QDir>
#include <QPushButton>
#include <QLineEdit>
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() {}

View File

@ -236,6 +236,9 @@
<property name="text">
<string>Open</string>
</property>
<property name="default">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
@ -401,13 +404,6 @@
<property name="topMargin">
<number>0</number>
</property>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer_4">
<property name="orientation">
@ -428,6 +424,13 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="cancelButton">
<property name="text">
<string>Close</string>
</property>
</widget>
</item>
<item>
<spacer name="horizontalSpacer">
<property name="orientation">
@ -459,7 +462,7 @@
<customwidget>
<class>QSvgWidget</class>
<extends>QWidget</extends>
<header>qsvgwidget.h</header>
<header>QSvgWidget</header>
<container>1</container>
</customwidget>
</customwidgets>