mirror of
https://github.com/UltimMC/Launcher.git
synced 2025-12-22 11:39:55 +00:00
Add "browse" button using Qt's file browser to settings dialog
This commit is contained in:
@@ -189,3 +189,12 @@ void SettingsDialog::on_pushButton_clicked()
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user