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 <QtGui>
#include <QMessageBox> #include <QMessageBox>
#include <QDir> #include <QDir>
#include <QPushButton>
#include <QLineEdit>
const int NewFileDialog::MaxRecentFiles; const int NewFileDialog::MaxRecentFiles;
@ -85,6 +87,9 @@ NewFileDialog::NewFileDialog(QWidget *parent) :
} }
ui->loadProjectButton->setEnabled(ui->projectsListWidget->currentItem() != nullptr); ui->loadProjectButton->setEnabled(ui->projectsListWidget->currentItem() != nullptr);
/* Set focus on the TextInput */
ui->newFileEdit->setFocus();
} }
NewFileDialog::~NewFileDialog() {} NewFileDialog::~NewFileDialog() {}

View File

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