mirror of
https://github.com/githubuser0xFFFF/Qt-Advanced-Docking-System.git
synced 2024-12-24 23:31:32 +08:00
fixes qt4 compatibility
This commit is contained in:
parent
4debaaaf85
commit
3d9e3c2efc
@ -14,10 +14,16 @@ SectionContentListModel::~SectionContentListModel()
|
|||||||
|
|
||||||
void SectionContentListModel::init(ADS_NS::ContainerWidget* cw)
|
void SectionContentListModel::init(ADS_NS::ContainerWidget* cw)
|
||||||
{
|
{
|
||||||
|
#if QT_VERSION >= 0x050000
|
||||||
beginResetModel();
|
beginResetModel();
|
||||||
_cw = cw;
|
_cw = cw;
|
||||||
_contents = _cw->contents();
|
_contents = _cw->contents();
|
||||||
endResetModel();
|
endResetModel();
|
||||||
|
#else
|
||||||
|
_cw = cw;
|
||||||
|
_contents = _cw->contents();
|
||||||
|
reset();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
int SectionContentListModel::columnCount(const QModelIndex& parent) const
|
int SectionContentListModel::columnCount(const QModelIndex& parent) const
|
||||||
|
Loading…
Reference in New Issue
Block a user