Add "browse" button using Qt's file browser to settings dialog
This commit is contained in:
parent
1dee4bb60d
commit
932376c6e0
@ -189,3 +189,12 @@ void SettingsDialog::on_pushButton_clicked()
|
|||||||
|
|
||||||
ui->javaPathTextBox->setText(paths.at(0));
|
ui->javaPathTextBox->setText(paths.at(0));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void SettingsDialog::on_btnBrowse_clicked()
|
||||||
|
{
|
||||||
|
QString dir = QFileDialog::getOpenFileName(this, tr("Find Java executable"));
|
||||||
|
if(!dir.isNull())
|
||||||
|
{
|
||||||
|
ui->javaPathTextBox->setText(dir);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -55,6 +55,8 @@ private slots:
|
|||||||
|
|
||||||
void on_pushButton_clicked();
|
void on_pushButton_clicked();
|
||||||
|
|
||||||
|
void on_btnBrowse_clicked();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
Ui::SettingsDialog *ui;
|
Ui::SettingsDialog *ui;
|
||||||
};
|
};
|
||||||
|
@ -379,26 +379,33 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="1">
|
<item row="2" column="0">
|
||||||
<widget class="QLineEdit" name="javaPathTextBox"/>
|
|
||||||
</item>
|
|
||||||
<item row="1" column="0">
|
|
||||||
<widget class="QLabel" name="labelJVMArgs">
|
<widget class="QLabel" name="labelJVMArgs">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>JVM arguments:</string>
|
<string>JVM arguments:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="0" column="2">
|
<item row="1" column="3">
|
||||||
|
<widget class="QPushButton" name="btnBrowse">
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse...</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="0" column="1" colspan="3">
|
||||||
|
<widget class="QLineEdit" name="javaPathTextBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="1" colspan="3">
|
||||||
|
<widget class="QLineEdit" name="jvmArgsTextBox"/>
|
||||||
|
</item>
|
||||||
|
<item row="1" column="2">
|
||||||
<widget class="QPushButton" name="pushButton">
|
<widget class="QPushButton" name="pushButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Auto-detect</string>
|
<string>Auto-detect</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="1" column="1" colspan="2">
|
|
||||||
<widget class="QLineEdit" name="jvmArgsTextBox"/>
|
|
||||||
</item>
|
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
Loading…
Reference in New Issue
Block a user