From 1fa94b34d0359cc95fc9442a0f1d104b7474ac17 Mon Sep 17 00:00:00 2001 From: royqh1979 Date: Mon, 30 Aug 2021 22:48:59 +0800 Subject: [PATCH] - feature: click group will open its first page in the settings dialog --- RedPandaIDE/settingsdialog/settingsdialog.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/RedPandaIDE/settingsdialog/settingsdialog.cpp b/RedPandaIDE/settingsdialog/settingsdialog.cpp index 0d3526b2..b3b34412 100644 --- a/RedPandaIDE/settingsdialog/settingsdialog.cpp +++ b/RedPandaIDE/settingsdialog/settingsdialog.cpp @@ -134,6 +134,10 @@ void SettingsDialog::on_widgetsView_clicked(const QModelIndex &index) ui->lblWidgetCaption->setText(QString("%1 > %2").arg(pWidget->group()).arg(pWidget->name())); ui->btnApply->setEnabled(false); + } else if (model.hasChildren(index)) { + ui->widgetsView->expand(index); + QModelIndex childIndex = this->model.index(0,0,index); + emit ui->widgetsView->clicked(childIndex); } }