Add the expanded signal to ExpandableRadioButton.

This commit is contained in:
Teo Mrnjavac 2015-11-08 17:50:25 +01:00
parent 526180dde2
commit a65be8bfda
2 changed files with 8 additions and 1 deletions

View File

@ -61,7 +61,11 @@ ExpandableRadioButton::setExpandableWidget( QWidget* widget )
updateGeometry(); updateGeometry();
connect( m_radio, &QRadioButton::toggled, connect( m_radio, &QRadioButton::toggled,
m_expandableWidget, &QWidget::setVisible ); this, [this]( bool visible )
{
m_expandableWidget->setVisible( visible );
emit expanded( visible );
} );
} }

View File

@ -36,6 +36,9 @@ public:
void setExpandableWidget( QWidget* widget ); void setExpandableWidget( QWidget* widget );
QWidget* expandableWidget() const; QWidget* expandableWidget() const;
signals:
void expanded( bool );
private: private:
QWidget* m_expandableWidget; QWidget* m_expandableWidget;
bool m_expanded; bool m_expanded;