diff --git a/settingsui/csettingsdialog.cpp b/settingsui/csettingsdialog.cpp
index 0d9fae7..0952ff3 100644
--- a/settingsui/csettingsdialog.cpp
+++ b/settingsui/csettingsdialog.cpp
@@ -19,10 +19,13 @@ CSettingsDialog::CSettingsDialog(QWidget *parent) :
ui->splitter->setStretchFactor(0, 0);
ui->splitter->setStretchFactor(1, 1);
- connect(ui->pageList, &QListWidget::itemClicked, this, &CSettingsDialog::pageChanged);
+ connect(ui->pageList, &QListWidget::currentItemChanged, this, &CSettingsDialog::pageChanged);
ui->pageList->setResizeMode(QListWidget::Adjust);
new QShortcut(QKeySequence("Ctrl+Shift+W"), this, this, &CSettingsDialog::wipeSettings);
+
+ ui->pageList->setFocus();
+ setTabOrder(ui->pageList, nullptr);
}
CSettingsDialog::~CSettingsDialog()
@@ -40,7 +43,12 @@ CSettingsDialog& CSettingsDialog::addSettingsPage(CSettingsPage* page, const QSt
ui->pageList->addItem(item);
if (ui->pages->count() == 1)
+ {
ui->pageList->setCurrentRow(0);
+ setTabOrder(ui->pageList, page);
+ }
+ else
+ setTabOrder(ui->pages->widget(ui->pages->count() - 1), page);
ui->pageList->adjustSize();
diff --git a/settingsui/csettingsdialog.ui b/settingsui/csettingsdialog.ui
index c8828f1..c5d6598 100644
--- a/settingsui/csettingsdialog.ui
+++ b/settingsui/csettingsdialog.ui
@@ -6,7 +6,7 @@
0
0
- 741
+ 622
437
@@ -26,11 +26,21 @@
false
-
+
+
+
+ 50
+ 0
+
+
+
-
+
+ Qt::TabFocus
+
Qt::Horizontal
@@ -41,6 +51,9 @@
+
+ pageList
+