+ support dynamic property 'fold' in TaskHeader
This commit is contained in:
parent
5b3d50afc4
commit
1eb76ba48c
|
@ -17,6 +17,7 @@
|
|||
#include <QPainter>
|
||||
#include <QMouseEvent>
|
||||
#include <QApplication>
|
||||
#include <QStyle>
|
||||
|
||||
|
||||
namespace QSint
|
||||
|
@ -69,6 +70,7 @@ void TaskHeader::setExpandable(bool expandable)
|
|||
myButton->setFixedSize(myScheme->headerButtonSize);
|
||||
layout()->addWidget(myButton);
|
||||
changeIcons();
|
||||
myButton->setProperty("fold", m_fold);
|
||||
|
||||
} else {
|
||||
myExpandable = false;
|
||||
|
@ -197,6 +199,14 @@ void TaskHeader::fold()
|
|||
|
||||
m_fold = !m_fold;
|
||||
changeIcons();
|
||||
if (myButton) {
|
||||
myButton->setProperty("fold", m_fold);
|
||||
if (myButton->style()) {
|
||||
myButton->style()->unpolish(myButton);
|
||||
myButton->style()->polish(myButton);
|
||||
myButton->update();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user