├── ExpanderWidget.pro ├── LICENSE ├── README.md ├── arrow-expanded.png ├── arrow.png ├── expanderwidget.cpp ├── expanderwidget.h ├── expanderwidgetcontainerextension.cpp ├── expanderwidgetcontainerextension.h ├── expanderwidgetextensionfactory.cpp ├── expanderwidgetextensionfactory.h ├── expanderwidgetplugin.cpp ├── expanderwidgetplugin.h ├── mainwindow.h ├── mainwindow.ui └── res.qrc /ExpanderWidget.pro: -------------------------------------------------------------------------------- 1 | QTDIR_build { 2 | # This is only for the Qt build. Do not use externally. We mean it. 3 | PLUGIN_TYPE = designer 4 | PLUGIN_CLASS_NAME = ExpanderWidgetPlugin 5 | load(qt_plugin) 6 | } else { 7 | # Public example: 8 | 9 | TEMPLATE = lib 10 | CONFIG += plugin 11 | 12 | TARGET = $$qtLibraryTarget($$TARGET) 13 | 14 | target.path = $$[QT_INSTALL_PLUGINS]/designer 15 | INSTALLS += target 16 | 17 | } 18 | 19 | QT += widgets designer 20 | 21 | CONFIG += c++11 22 | 23 | HEADERS += \ 24 | expanderwidgetplugin.h \ 25 | expanderwidget.h \ 26 | expanderwidgetcontainerextension.h \ 27 | expanderwidgetextensionfactory.h 28 | 29 | SOURCES += \ 30 | expanderwidget.cpp \ 31 | expanderwidgetcontainerextension.cpp \ 32 | expanderwidgetextensionfactory.cpp \ 33 | expanderwidgetplugin.cpp 34 | 35 | RESOURCES += \ 36 | res.qrc 37 | 38 | 39 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Daniel 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | QtExpanderWidget 2 | ================ 3 | 4 | Qt ExpanderWidget for Qt 5.x 5 | 6 | 7 | build setting: release 8 | build project 9 | 10 | windows: 11 | copy ExpanderWidget.dll to this location: 12 | C:\Qt\Qt5.2.1\5.2.1\mingw48_32\plugins\designer 13 | ----------------------------------------------- 14 | 15 | osx: 16 | 17 | ----------------------------------------------- 18 | 19 | run Qt Designer and open mainwindow.ui 20 | 21 | -------------------------------------------------------------------------------- /arrow-expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielSeges/QtExpanderWidget/e02e991ed6682805d53cb4b2ceb05b917e34b4c7/arrow-expanded.png -------------------------------------------------------------------------------- /arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/DanielSeges/QtExpanderWidget/e02e991ed6682805d53cb4b2ceb05b917e34b4c7/arrow.png -------------------------------------------------------------------------------- /expanderwidget.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | 6 | #include "expanderwidget.h" 7 | 8 | ExpanderWidget::ExpanderWidget(QWidget *parent, bool in_designer) 9 | : QWidget(parent) 10 | { 11 | m_in_designer = in_designer; 12 | m_expanded = true; 13 | 14 | m_collapsedIcon=QIcon(":/arrow.png"); 15 | m_expandedIcon=QIcon(":/arrow-expanded.png"); 16 | 17 | m_button = new QPushButton(); 18 | m_button->setObjectName("__qt__passive_button"); 19 | m_button->setText("Expander"); 20 | m_button->setFlat(true); 21 | m_button->setCheckable(true); 22 | m_button->setChecked(true); 23 | m_button->setIcon(m_expandedIcon); 24 | m_button->setStyleSheet("text-align: left; font-weight: bold; border: none;"); 25 | 26 | connect(m_button, SIGNAL(clicked()), this, SLOT(buttonPressed())); 27 | 28 | m_stackWidget = new QStackedWidget(); 29 | 30 | m_layout = new QVBoxLayout(); 31 | m_layout->addWidget(m_button, 0, Qt::AlignTop); 32 | m_layout->addWidget(m_stackWidget); 33 | setLayout(m_layout); 34 | } 35 | 36 | void ExpanderWidget::buttonPressed() 37 | { 38 | if(m_expanded) 39 | { 40 | m_expanded = false; 41 | m_button->setIcon(m_collapsedIcon); 42 | m_stackWidget->hide(); 43 | } 44 | else 45 | { 46 | m_expanded = true; 47 | m_button->setIcon(m_expandedIcon); 48 | m_stackWidget->show(); 49 | } 50 | 51 | if(!m_in_designer && !m_settingsKey.isEmpty()) 52 | { 53 | QSettings settings; 54 | settings.setValue(m_settingsKey,m_expanded); 55 | } 56 | 57 | QSize size = m_layout->sizeHint(); 58 | int width = size.width(); 59 | int height = size.height(); 60 | 61 | resize(width, height); 62 | 63 | updateGeometry(); 64 | 65 | emit expanderChanged(m_expanded); 66 | } 67 | 68 | QSize ExpanderWidget::sizeHint() const 69 | { 70 | return m_layout->sizeHint(); 71 | } 72 | 73 | void ExpanderWidget::addPage(QWidget *page) 74 | { 75 | insertPage(count(), page); 76 | } 77 | 78 | void ExpanderWidget::removePage(int index) 79 | { 80 | 81 | } 82 | 83 | int ExpanderWidget::count() const 84 | { 85 | return m_stackWidget->count(); 86 | } 87 | 88 | int ExpanderWidget::currentIndex() const 89 | { 90 | return m_stackWidget->currentIndex(); 91 | } 92 | 93 | void ExpanderWidget::insertPage(int index, QWidget *page) 94 | { 95 | page->setParent(m_stackWidget); 96 | m_stackWidget->insertWidget(index, page); 97 | } 98 | 99 | void ExpanderWidget::setCurrentIndex(int index) 100 | { 101 | if (index != currentIndex()) { 102 | m_stackWidget->setCurrentIndex(index); 103 | emit currentIndexChanged(index); 104 | } 105 | } 106 | 107 | QWidget* ExpanderWidget::widget(int index) 108 | { 109 | return m_stackWidget->widget(index); 110 | } 111 | 112 | void ExpanderWidget::setExpanderTitle(QString const &newTitle) 113 | { 114 | m_button->setText(newTitle); 115 | } 116 | 117 | QString ExpanderWidget::expanderTitle() const 118 | { 119 | return m_button->text(); 120 | } 121 | 122 | void ExpanderWidget::setExpanded(bool flag) 123 | { 124 | if(flag != m_expanded) 125 | buttonPressed(); 126 | } 127 | 128 | bool ExpanderWidget::isExpanded() const 129 | { 130 | return m_expanded; 131 | } 132 | 133 | QIcon ExpanderWidget::collapsedIcon() const 134 | { 135 | return m_collapsedIcon; 136 | } 137 | 138 | QIcon ExpanderWidget::expandedIcon() const 139 | { 140 | return m_expandedIcon; 141 | } 142 | 143 | void ExpanderWidget::setCollapsedIcon(const QIcon & icon) 144 | { 145 | m_collapsedIcon=icon; 146 | if(!m_expanded) 147 | { 148 | m_button->setIcon(m_collapsedIcon); 149 | } 150 | } 151 | 152 | void ExpanderWidget::setExpandedIcon(const QIcon & icon) 153 | { 154 | m_expandedIcon=icon; 155 | if(m_expanded) 156 | { 157 | m_button->setIcon(m_expandedIcon); 158 | } 159 | } 160 | 161 | QString ExpanderWidget::settingsKey() const 162 | { 163 | return m_settingsKey; 164 | } 165 | 166 | void ExpanderWidget::setSettingsKey(QString key) 167 | { 168 | m_settingsKey=key; 169 | 170 | if(!m_in_designer && !m_settingsKey.isEmpty()) 171 | { 172 | QSettings settings; 173 | bool flag = settings.value(m_settingsKey,m_expanded).toBool(); 174 | if(flag != m_expanded) 175 | buttonPressed(); 176 | } 177 | } 178 | -------------------------------------------------------------------------------- /expanderwidget.h: -------------------------------------------------------------------------------- 1 | #ifndef EXPANDERWIDGET_H 2 | #define EXPANDERWIDGET_H 3 | 4 | #include 5 | #include 6 | 7 | class QPushButton; 8 | class QStackedWidget; 9 | class QVBoxLayout; 10 | 11 | #ifdef _WIN32 12 | #ifdef QTEXPANDERWIDGET_EXPORT 13 | #define QTEXPANDERWIDGET_DLLIMPEXP __declspec(dllexport) 14 | #else 15 | #define QTEXPANDERWIDGET_DLLIMPEXP __declspec(dllexport) 16 | #endif 17 | #else 18 | #define QTEXPANDERWIDGET_DLLIMPEXP __attribute__ ((visibility ("default"))) 19 | #endif 20 | 21 | class QTEXPANDERWIDGET_DLLIMPEXP ExpanderWidget : public QWidget 22 | { 23 | Q_OBJECT 24 | Q_PROPERTY(QString expanderTitle READ expanderTitle WRITE setExpanderTitle STORED true) 25 | Q_PROPERTY(bool isExpanded READ isExpanded WRITE setExpanded STORED true) 26 | Q_PROPERTY(QIcon collapsedIcon READ collapsedIcon WRITE setCollapsedIcon STORED true) 27 | Q_PROPERTY(QIcon expandedIcon READ expandedIcon WRITE setExpandedIcon STORED true) 28 | Q_PROPERTY(QString settingsKey READ settingsKey WRITE setSettingsKey STORED true) 29 | 30 | public: 31 | explicit ExpanderWidget(QWidget *parent = 0, bool in_designer=false); 32 | virtual ~ExpanderWidget(){}; 33 | 34 | QSize sizeHint() const; 35 | 36 | int count() const; 37 | int currentIndex() const; 38 | QWidget *widget(int index); 39 | 40 | QString expanderTitle() const; 41 | bool isExpanded() const; 42 | 43 | QIcon collapsedIcon() const; 44 | QIcon expandedIcon() const; 45 | 46 | QString settingsKey() const; 47 | 48 | public slots: 49 | 50 | void buttonPressed(); 51 | void setExpanderTitle(const QString &title); 52 | void setExpanded(bool flag); 53 | 54 | void setCollapsedIcon(const QIcon & icon); 55 | void setExpandedIcon(const QIcon & icon); 56 | 57 | void setSettingsKey(QString key); 58 | 59 | void addPage(QWidget *page); 60 | void insertPage(int index, QWidget *page); 61 | void removePage(int index); 62 | void setCurrentIndex(int index); 63 | 64 | signals: 65 | void currentIndexChanged(int index); 66 | void expanderChanged(bool flag); 67 | 68 | private: 69 | bool m_expanded; 70 | bool m_in_designer; 71 | 72 | QPushButton *m_button; 73 | QStackedWidget *m_stackWidget; 74 | QVBoxLayout *m_layout; 75 | 76 | QIcon m_collapsedIcon; 77 | QIcon m_expandedIcon; 78 | 79 | QString m_settingsKey; 80 | }; 81 | 82 | #endif 83 | -------------------------------------------------------------------------------- /expanderwidgetcontainerextension.cpp: -------------------------------------------------------------------------------- 1 | #include "expanderwidgetcontainerextension.h" 2 | #include "expanderwidget.h" 3 | 4 | ExpanderWidgetContainerExtension::ExpanderWidgetContainerExtension(ExpanderWidget *widget, 5 | QObject *parent) 6 | :QObject(parent) 7 | { 8 | myWidget = widget; 9 | } 10 | 11 | void ExpanderWidgetContainerExtension::addWidget(QWidget *widget) 12 | { 13 | myWidget->addPage(widget); 14 | } 15 | 16 | int ExpanderWidgetContainerExtension::count() const 17 | { 18 | return myWidget->count(); 19 | } 20 | 21 | int ExpanderWidgetContainerExtension::currentIndex() const 22 | { 23 | return myWidget->currentIndex(); 24 | } 25 | 26 | void ExpanderWidgetContainerExtension::insertWidget(int index, QWidget *widget) 27 | { 28 | myWidget->insertPage(index, widget); 29 | } 30 | 31 | void ExpanderWidgetContainerExtension::remove(int index) 32 | { 33 | myWidget->removePage(index); 34 | } 35 | 36 | void ExpanderWidgetContainerExtension::setCurrentIndex(int index) 37 | { 38 | myWidget->setCurrentIndex(index); 39 | } 40 | 41 | QWidget* ExpanderWidgetContainerExtension::widget(int index) const 42 | { 43 | return myWidget->widget(index); 44 | } 45 | -------------------------------------------------------------------------------- /expanderwidgetcontainerextension.h: -------------------------------------------------------------------------------- 1 | #ifndef EXPANDERWIDGETCONTAINEREXTENSION_H 2 | #define EXPANDERWIDGETCONTAINEREXTENSION_H 3 | 4 | #include 5 | 6 | class QExtensionManager; 7 | 8 | class ExpanderWidget; 9 | 10 | class ExpanderWidgetContainerExtension: public QObject, 11 | public QDesignerContainerExtension 12 | { 13 | Q_OBJECT 14 | Q_INTERFACES(QDesignerContainerExtension) 15 | 16 | public: 17 | explicit ExpanderWidgetContainerExtension(ExpanderWidget *widget, QObject *parent); 18 | virtual ~ExpanderWidgetContainerExtension(){}; 19 | 20 | void addWidget(QWidget *widget); 21 | int count() const; 22 | int currentIndex() const; 23 | void insertWidget(int index, QWidget *widget); 24 | void remove(int index); 25 | void setCurrentIndex(int index); 26 | QWidget *widget(int index) const; 27 | 28 | private: 29 | ExpanderWidget *myWidget; 30 | }; 31 | 32 | #endif 33 | -------------------------------------------------------------------------------- /expanderwidgetextensionfactory.cpp: -------------------------------------------------------------------------------- 1 | #include "expanderwidgetextensionfactory.h" 2 | #include "expanderwidgetcontainerextension.h" 3 | #include "expanderwidget.h" 4 | 5 | ExpanderWidgetExtensionFactory::ExpanderWidgetExtensionFactory(QExtensionManager *parent) 6 | : QExtensionFactory(parent) 7 | {} 8 | 9 | QObject *ExpanderWidgetExtensionFactory::createExtension(QObject *object, 10 | const QString &iid, 11 | QObject *parent) const 12 | { 13 | ExpanderWidget *widget = qobject_cast(object); 14 | 15 | if (widget && (iid == Q_TYPEID(QDesignerContainerExtension))) { 16 | return new ExpanderWidgetContainerExtension(widget, parent); 17 | } else { 18 | return 0; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /expanderwidgetextensionfactory.h: -------------------------------------------------------------------------------- 1 | #ifndef EXPANDERWIDGETEXTENSIONFACTORY_H 2 | #define EXPANDERWIDGETEXTENSIONFACTORY_H 3 | 4 | #include 5 | 6 | class QExtensionManager; 7 | 8 | class ExpanderWidgetExtensionFactory: public QExtensionFactory 9 | { 10 | Q_OBJECT 11 | 12 | public: 13 | explicit ExpanderWidgetExtensionFactory(QExtensionManager *parent = 0); 14 | virtual ~ExpanderWidgetExtensionFactory(){}; 15 | 16 | protected: 17 | QObject *createExtension(QObject *object, const QString &iid, QObject *parent) const; 18 | }; 19 | 20 | #endif 21 | -------------------------------------------------------------------------------- /expanderwidgetplugin.cpp: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | #include 5 | #include 6 | #include 7 | 8 | #include 9 | #include 10 | 11 | #include "expanderwidget.h" 12 | #include "expanderwidgetplugin.h" 13 | #include "expanderwidgetextensionfactory.h" 14 | 15 | ExpanderWidgetPlugin::ExpanderWidgetPlugin(QObject *parent) 16 | :QObject(parent) 17 | { 18 | initialized = false; 19 | } 20 | 21 | QString ExpanderWidgetPlugin::name() const 22 | { 23 | return QLatin1String("ExpanderWidget"); 24 | } 25 | 26 | QString ExpanderWidgetPlugin::group() const 27 | { 28 | return QLatin1String("Display Widgets"); 29 | } 30 | 31 | QString ExpanderWidgetPlugin::toolTip() const 32 | { 33 | return QString(); 34 | } 35 | 36 | QString ExpanderWidgetPlugin::whatsThis() const 37 | { 38 | return QString(); 39 | } 40 | 41 | QString ExpanderWidgetPlugin::includeFile() const 42 | { 43 | return QLatin1String("expanderwidget.h"); 44 | } 45 | 46 | QIcon ExpanderWidgetPlugin::icon() const 47 | { 48 | return QIcon(); 49 | } 50 | 51 | bool ExpanderWidgetPlugin::isContainer() const 52 | { 53 | return true; 54 | } 55 | 56 | QWidget *ExpanderWidgetPlugin::createWidget(QWidget *parent) 57 | { 58 | ExpanderWidget *widget = new ExpanderWidget(parent, true); 59 | connect(widget, SIGNAL(expanderChanged(bool)),this, SLOT(expanderChanged(bool))); 60 | return widget; 61 | } 62 | 63 | bool ExpanderWidgetPlugin::isInitialized() const 64 | { 65 | return initialized; 66 | } 67 | 68 | void ExpanderWidgetPlugin::initialize(QDesignerFormEditorInterface *formEditor) 69 | { 70 | if (initialized) 71 | return; 72 | 73 | QExtensionManager *manager = formEditor->extensionManager(); 74 | QExtensionFactory *factory = new ExpanderWidgetExtensionFactory(manager); 75 | 76 | Q_ASSERT(manager != 0); 77 | manager->registerExtensions(factory, Q_TYPEID(QDesignerContainerExtension)); 78 | 79 | initialized = true; 80 | } 81 | 82 | QString ExpanderWidgetPlugin::domXml() const 83 | { 84 | return QLatin1String("\ 85 | \ 86 | \ 87 | \ 88 | \ 89 | \ 90 | \ 91 | ExpanderWidget\ 92 | QWidget\ 93 | addPage\ 94 | \ 95 | \ 96 | "); 97 | } 98 | 99 | void ExpanderWidgetPlugin::expanderChanged(bool flag) 100 | { 101 | ExpanderWidget *widget = qobject_cast(sender()); 102 | if (widget) { 103 | 104 | QDesignerFormWindowInterface *form; 105 | form = QDesignerFormWindowInterface::findFormWindow(widget); 106 | if (form) { 107 | QDesignerFormEditorInterface *editor = form->core(); 108 | QExtensionManager *manager = editor->extensionManager(); 109 | QDesignerPropertySheetExtension *sheet; 110 | sheet = qt_extension(manager, widget); 111 | const int propertyIndex = sheet->indexOf(QLatin1String("isExpanded")); 112 | 113 | sheet->setChanged(propertyIndex, true); 114 | 115 | } 116 | } 117 | 118 | 119 | } 120 | -------------------------------------------------------------------------------- /expanderwidgetplugin.h: -------------------------------------------------------------------------------- 1 | #ifndef EXPANDERWIDGETPLUGIN_H 2 | #define EXPANDERWIDGETPLUGIN_H 3 | 4 | #include 5 | 6 | class QIcon; 7 | class QWidget; 8 | 9 | class ExpanderWidgetPlugin: public QObject, public QDesignerCustomWidgetInterface 10 | { 11 | Q_OBJECT 12 | Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidget") 13 | Q_INTERFACES(QDesignerCustomWidgetInterface) 14 | public: 15 | explicit ExpanderWidgetPlugin(QObject *parent = 0); 16 | virtual ~ExpanderWidgetPlugin(){}; 17 | 18 | QString name() const; 19 | QString group() const; 20 | QString toolTip() const; 21 | QString whatsThis() const; 22 | QString includeFile() const; 23 | QIcon icon() const; 24 | bool isContainer() const; 25 | QWidget *createWidget(QWidget *parent); 26 | bool isInitialized() const; 27 | void initialize(QDesignerFormEditorInterface *formEditor); 28 | QString domXml() const; 29 | 30 | private slots: 31 | void expanderChanged(bool flag); 32 | 33 | private: 34 | bool initialized; 35 | }; 36 | 37 | #endif 38 | -------------------------------------------------------------------------------- /mainwindow.h: -------------------------------------------------------------------------------- 1 | #ifndef MAINWINDOW_H 2 | #define MAINWINDOW_H 3 | 4 | #include 5 | 6 | namespace Ui { 7 | class MainWindow; 8 | } 9 | 10 | class MainWindow : public QMainWindow 11 | { 12 | Q_OBJECT 13 | 14 | public: 15 | explicit MainWindow(QWidget *parent = 0); 16 | virtual ~MainWindow(){}; 17 | 18 | private: 19 | Ui::MainWindow *ui; 20 | }; 21 | 22 | #endif // MAINWINDOW_H 23 | -------------------------------------------------------------------------------- /mainwindow.ui: -------------------------------------------------------------------------------- 1 | 2 | 3 | Form 4 | 5 | 6 | Qt::WindowModal 7 | 8 | 9 | 10 | 0 11 | 0 12 | 1109 13 | 687 14 | 15 | 16 | 17 | 18 | 750 19 | 550 20 | 21 | 22 | 23 | Settings 24 | 25 | 26 | 27 | 28 | 29 | QDialogButtonBox::Cancel|QDialogButtonBox::Ok 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | QFrame::StyledPanel 39 | 40 | 41 | QFrame::Plain 42 | 43 | 44 | 0 45 | 46 | 47 | true 48 | 49 | 50 | 51 | 52 | 0 53 | 0 54 | 1087 55 | 636 56 | 57 | 58 | 59 | 60 | 0 61 | 62 | 63 | 5 64 | 65 | 66 | 0 67 | 68 | 69 | 5 70 | 71 | 72 | 0 73 | 74 | 75 | 76 | 77 | 78 | 79 | Settings 80 | 81 | 82 | true 83 | 84 | 85 | 86 | 87 | 88 | 89 | 6 90 | 91 | 92 | 93 | 94 | QFrame::NoFrame 95 | 96 | 97 | true 98 | 99 | 100 | 101 | 102 | 0 103 | 0 104 | 1020 105 | 260 106 | 107 | 108 | 109 | 110 | 0 111 | 112 | 113 | 0 114 | 115 | 116 | 0 117 | 118 | 119 | 0 120 | 121 | 122 | 0 123 | 124 | 125 | 126 | 127 | 6 128 | 129 | 130 | 131 | 132 | Qt::Horizontal 133 | 134 | 135 | 136 | 40 137 | 20 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | xxxx 146 | 147 | 148 | 149 | 150 | 151 | 152 | font-weight: bold 153 | 154 | 155 | xxxxx 156 | 157 | 158 | false 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 120 167 | 16777215 168 | 169 | 170 | 171 | 30 172 | 173 | 174 | 175 | 176 | 177 | 178 | Qt::Horizontal 179 | 180 | 181 | 182 | 40 183 | 20 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | abcd 192 | 193 | 194 | 195 | 196 | 197 | 198 | Qt::Horizontal 199 | 200 | 201 | 202 | 203 | 204 | 205 | efgh 206 | 207 | 208 | 209 | 210 | 211 | 212 | Qt::Horizontal 213 | 214 | 215 | 216 | 40 217 | 20 218 | 219 | 220 | 221 | 222 | 223 | 224 | 225 | 226 | 120 227 | 16777215 228 | 229 | 230 | 231 | 232 | 233 | 234 | 235 | 236 | 150 237 | 16777215 238 | 239 | 240 | 241 | Nastav default nastavenia 242 | 243 | 244 | 245 | 246 | 247 | 248 | xxx 249 | 250 | 251 | 252 | 253 | 254 | 255 | Qt::Horizontal 256 | 257 | 258 | 259 | 260 | 261 | 262 | 263 | 200 264 | 16777215 265 | 266 | 267 | 268 | false 269 | 270 | 271 | 30 272 | 273 | 274 | Qt::Horizontal 275 | 276 | 277 | false 278 | 279 | 280 | QSlider::TicksBelow 281 | 282 | 283 | 284 | 285 | 286 | 287 | Qt::Horizontal 288 | 289 | 290 | 291 | 292 | 293 | 294 | xxxx 295 | 296 | 297 | 298 | 299 | 300 | 301 | xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx 302 | 303 | 304 | 305 | 306 | 307 | 308 | Qt::Horizontal 309 | 310 | 311 | 312 | 40 313 | 20 314 | 315 | 316 | 317 | 318 | 319 | 320 | 321 | 322 | 120 323 | 16777215 324 | 325 | 326 | 327 | 60 328 | 329 | 330 | 331 | 332 | 333 | 334 | 335 | 336 | 337 | 338 | 339 | 340 | 341 | 342 | 343 | 344 | 345 | 346 | 347 | 348 | 349 | 350 | 351 | 352 | 353 | 354 | 355 | 356 | 357 | 358 | 359 | 360 | Qt::Horizontal 361 | 362 | 363 | 364 | 365 | 366 | 367 | xxxxxxxxxxx 368 | 369 | 370 | 371 | 372 | 373 | 374 | QFrame::NoFrame 375 | 376 | 377 | QFrame::Plain 378 | 379 | 380 | 381 | 382 | 383 | 384 | 385 | 386 | 387 | 388 | 389 | 390 | 391 | 392 | 393 | ExpanderWidget 394 | QWidget 395 |
expanderwidget.h
396 | addPage 397 | 1 398 |
399 |
400 | 401 | 402 |
403 | -------------------------------------------------------------------------------- /res.qrc: -------------------------------------------------------------------------------- 1 | 2 | 3 | arrow.png 4 | arrow-expanded.png 5 | 6 | 7 | --------------------------------------------------------------------------------