diff options
author | Stephen Kelly <stephen.kelly@kdab.com> | 2012-11-23 15:24:48 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-01-29 09:28:43 +0100 |
commit | d315e012184a2b71b7b5e41869d166c05093d13d (patch) | |
tree | eef06bdd093861b8e0e394021ba398a0cf83294d /src/corelib/itemmodels/qabstractitemmodel.h | |
parent | d78bd439dcb290e4318734693d418937b0bf8129 (diff) |
Add the Qt::ItemNeverHasChildren flag and use it in QTreeView.
It can be used to determine whether expand() should really expand.
Change-Id: If79d8c295a4ca1356e60051682b227524a065126
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/corelib/itemmodels/qabstractitemmodel.h')
-rw-r--r-- | src/corelib/itemmodels/qabstractitemmodel.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/corelib/itemmodels/qabstractitemmodel.h b/src/corelib/itemmodels/qabstractitemmodel.h index f138f53487..8e4f12e9ea 100644 --- a/src/corelib/itemmodels/qabstractitemmodel.h +++ b/src/corelib/itemmodels/qabstractitemmodel.h @@ -419,6 +419,7 @@ public: bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); + Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; protected: QAbstractTableModel(QAbstractItemModelPrivate &dd, QObject *parent); @@ -439,6 +440,8 @@ public: QModelIndex index(int row, int column = 0, const QModelIndex &parent = QModelIndex()) const; bool dropMimeData(const QMimeData *data, Qt::DropAction action, int row, int column, const QModelIndex &parent); + + Qt::ItemFlags flags(const QModelIndex &index) const Q_DECL_OVERRIDE; protected: QAbstractListModel(QAbstractItemModelPrivate &dd, QObject *parent); |