diff options
author | Jarek Kobus <jkobus@trolltech.com> | 2011-02-23 08:54:06 (GMT) |
---|---|---|
committer | Jarek Kobus <jkobus@trolltech.com> | 2011-02-23 08:54:06 (GMT) |
commit | 8c26d65c8ea9bd8f102c19d6de1750cbba2985c1 (patch) | |
tree | 0fde818f4e1716ee104ef3453c8fe70af799b84f /tools/designer | |
parent | 49f019e2aef788ba5399de062254530bc429eee7 (diff) | |
download | Qt-8c26d65c8ea9bd8f102c19d6de1750cbba2985c1.zip Qt-8c26d65c8ea9bd8f102c19d6de1750cbba2985c1.tar.gz Qt-8c26d65c8ea9bd8f102c19d6de1750cbba2985c1.tar.bz2 |
Store property editor's column positions in settings
RevBy: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Task: QTBUG-15497
Diffstat (limited to 'tools/designer')
-rw-r--r-- | tools/designer/src/components/propertyeditor/propertyeditor.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/designer/src/components/propertyeditor/propertyeditor.cpp b/tools/designer/src/components/propertyeditor/propertyeditor.cpp index 521b5cb..9f298d0 100644 --- a/tools/designer/src/components/propertyeditor/propertyeditor.cpp +++ b/tools/designer/src/components/propertyeditor/propertyeditor.cpp @@ -91,6 +91,7 @@ static const char *ViewKeyC = "View"; static const char *ColorKeyC = "Colored"; static const char *SortedKeyC = "Sorted"; static const char *ExpansionKeyC = "ExpandedItems"; +static const char *SplitterPositionKeyC = "SplitterPosition"; enum SettingsView { TreeView, ButtonView }; @@ -365,10 +366,12 @@ PropertyEditor::PropertyEditor(QDesignerFormEditorInterface *core, QWidget *pare m_sorting = settings->value(QLatin1String(SortedKeyC), false).toBool(); m_coloring = settings->value(QLatin1String(ColorKeyC), true).toBool(); const QVariantMap expansionState = settings->value(QLatin1String(ExpansionKeyC), QVariantMap()).toMap(); + const int splitterPosition = settings->value(QLatin1String(SplitterPositionKeyC), 150).toInt(); settings->endGroup(); // Apply settings m_sortingAction->setChecked(m_sorting); m_coloringAction->setChecked(m_coloring); + m_treeBrowser->setSplitterPosition(splitterPosition); #if QT_VERSION >= 0x040500 switch (view) { case TreeView: @@ -415,6 +418,7 @@ void PropertyEditor::saveSettings() const expansionState.insert(it.key(), QVariant(it.value())); } settings->setValue(QLatin1String(ExpansionKeyC), expansionState); + settings->setValue(QLatin1String(SplitterPositionKeyC), m_treeBrowser->splitterPosition()); settings->endGroup(); } |