diff options
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/mainwindow.cpp | 9 | ||||
-rw-r--r-- | qt-ui/mainwindow.ui | 13 |
2 files changed, 10 insertions, 12 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index c1e15e30c..71ba70525 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -289,9 +289,12 @@ void MainWindow::readSettings() { QSettings settings("hohndel.org","subsurface"); - /* note: section/key i.e. forward slash to separate */ - QSize sz = settings.value("MainWindow/size").value<QSize>(); + settings.beginGroup("MainWindow"); + QSize sz = settings.value("size").value<QSize>(); resize(sz); + ui->mainSplitter->restoreState(settings.value("mainSplitter").toByteArray()); + ui->infoProfileSplitter->restoreState(settings.value("infoProfileSplitter").toByteArray()); + settings.endGroup(); } void MainWindow::writeSettings() @@ -299,6 +302,8 @@ void MainWindow::writeSettings() QSettings settings("hohndel.org","subsurface"); settings.beginGroup("MainWindow"); settings.setValue("size",size()); + settings.setValue("mainSplitter", ui->mainSplitter->saveState()); + settings.setValue("infoProfileSplitter", ui->infoProfileSplitter->saveState()); settings.endGroup(); /* other groups here; avoid '/' and '\' in keys with setValue(...) please */ } diff --git a/qt-ui/mainwindow.ui b/qt-ui/mainwindow.ui index 3d3f0ec35..073476918 100644 --- a/qt-ui/mainwindow.ui +++ b/qt-ui/mainwindow.ui @@ -16,11 +16,11 @@ <widget class="QWidget" name="centralwidget"> <layout class="QVBoxLayout" name="verticalLayout"> <item> - <widget class="QSplitter" name="splitter_3"> + <widget class="QSplitter" name="mainSplitter"> <property name="orientation"> <enum>Qt::Vertical</enum> </property> - <widget class="QSplitter" name="splitter_2"> + <widget class="QSplitter" name="infoProfileSplitter"> <property name="orientation"> <enum>Qt::Horizontal</enum> </property> @@ -34,13 +34,6 @@ </widget> </widget> </item> - <item> - <widget class="QSplitter" name="splitter"> - <property name="orientation"> - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> </layout> </widget> <widget class="QMenuBar" name="menubar"> @@ -49,7 +42,7 @@ <x>0</x> <y>0</y> <width>763</width> - <height>25</height> + <height>20</height> </rect> </property> <widget class="QMenu" name="menuFile"> |