Skip to content

Commit 986ffd6

Browse files
committed
collapsible gpbox: scroll on expand property accessible
1 parent 19e727e commit 986ffd6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

python/gui/qgscollapsiblegroupbox.sip

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ class QgsCollapsibleGroupBoxBasic : QGroupBox
2828

2929
//! set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
3030
void setScrollOnExpand( bool scroll );
31+
32+
bool scrollOnExpand();
3133

3234
signals:
3335
/** Signal emitted when groupbox collapsed/expanded state is changed, and when first shown */

src/gui/qgscollapsiblegroupbox.h

+4
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox
7474

7575
Q_PROPERTY( bool collapsed READ isCollapsed WRITE setCollapsed USER true )
7676
Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
77+
Q_PROPERTY( bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnExpand )
7778

7879
public:
7980
QgsCollapsibleGroupBoxBasic( QWidget *parent = 0 );
@@ -90,6 +91,8 @@ class GUI_EXPORT QgsCollapsibleGroupBoxBasic : public QGroupBox
9091
//! set this to false to not automatically scroll parent QScrollArea to this widget's contents when expanded
9192
void setScrollOnExpand( bool scroll ) { mScrollOnExpand = scroll; }
9293

94+
bool scrollOnExpand() {return mScrollOnExpand;}
95+
9396
signals:
9497
/** Signal emitted when groupbox collapsed/expanded state is changed, and when first shown */
9598
void collapsedStateChanged( bool collapsed );
@@ -150,6 +153,7 @@ class GUI_EXPORT QgsCollapsibleGroupBox : public QgsCollapsibleGroupBoxBasic
150153
Q_PROPERTY( bool saveCollapsedState READ saveCollapsedState WRITE setSaveCollapsedState )
151154
Q_PROPERTY( bool saveCheckedState READ saveCheckedState WRITE setSaveCheckedState )
152155
Q_PROPERTY( QString syncGroup READ syncGroup WRITE setSyncGroup )
156+
Q_PROPERTY( bool scrollOnExpand READ scrollOnExpand WRITE setScrollOnExpand )
153157

154158
public:
155159
QgsCollapsibleGroupBox( QWidget *parent = 0, QSettings* settings = 0 );

0 commit comments

Comments
 (0)