summaryrefslogtreecommitdiffstats
path: root/src/corelib/global
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-11-23 15:24:48 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-29 09:28:43 +0100
commitd315e012184a2b71b7b5e41869d166c05093d13d (patch)
treeeef06bdd093861b8e0e394021ba398a0cf83294d /src/corelib/global
parentd78bd439dcb290e4318734693d418937b0bf8129 (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/global')
-rw-r--r--src/corelib/global/qnamespace.h3
-rw-r--r--src/corelib/global/qnamespace.qdoc1
2 files changed, 3 insertions, 1 deletions
diff --git a/src/corelib/global/qnamespace.h b/src/corelib/global/qnamespace.h
index ebbfc9ca83..a60743d3df 100644
--- a/src/corelib/global/qnamespace.h
+++ b/src/corelib/global/qnamespace.h
@@ -1395,7 +1395,8 @@ public:
ItemIsDropEnabled = 8,
ItemIsUserCheckable = 16,
ItemIsEnabled = 32,
- ItemIsTristate = 64
+ ItemIsTristate = 64,
+ ItemNeverHasChildren = 128
};
Q_DECLARE_FLAGS(ItemFlags, ItemFlag)
diff --git a/src/corelib/global/qnamespace.qdoc b/src/corelib/global/qnamespace.qdoc
index f157190591..b271620ee0 100644
--- a/src/corelib/global/qnamespace.qdoc
+++ b/src/corelib/global/qnamespace.qdoc
@@ -2441,6 +2441,7 @@
\value ItemIsUserCheckable It can be checked or unchecked by the user.
\value ItemIsEnabled The user can interact with the item.
\value ItemIsTristate The item is checkable with three separate states.
+ \value ItemNeverHasChildren The item never has child items.
Note that checkable items need to be given both a suitable set of flags
and an initial state, indicating whether the item is checked or not.