diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-11-19 17:00:10 +0100 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2021-12-09 23:16:37 +0100 |
commit | 0ddb0d4b9b0c70c4fd4058ef4660e38fd933523e (patch) | |
tree | a1edb527abb0038e1be4092f3e875689840f9433 /tests/benchmarks | |
parent | 8ec849646d8bd590e64bda6105021bde58fa7ae3 (diff) |
controls: add TreeViewDelegate
This patch adds TreeViewDelegate to Controls.
TreeViewDelegate is a ready-made delegate that can be
assigned to TreeView. It takes care of drawing the
tree using the style, and can be used directly
without the need for customization.
It implements all the required properties set
by TreeView, and offers in addition a small API that
lets the developer change the indicator and the label.
[ChangeLog][Controls] New delegate added: TreeViewDelegate
Change-Id: I50fbc059afbc2b896d23d9d59717c8571e94bae6
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/quickcontrols2/creationtime/tst_creationtime.cpp | 3 | ||||
-rw-r--r-- | tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/benchmarks/quickcontrols2/creationtime/tst_creationtime.cpp b/tests/benchmarks/quickcontrols2/creationtime/tst_creationtime.cpp index 1e405c80aa..9c1609fee3 100644 --- a/tests/benchmarks/quickcontrols2/creationtime/tst_creationtime.cpp +++ b/tests/benchmarks/quickcontrols2/creationtime/tst_creationtime.cpp @@ -107,8 +107,9 @@ void tst_CreationTime::basic_data() { QTest::addColumn<QUrl>("url"); // Calendar is excluded because it's a singleton and can't be created. + // TreeViewDelegate is excluded since it's a delegate that can only be created by TreeView. addTestRowForEachControl(styleHelper.engine.data(), QQC2_IMPORT_PATH, "basic", "QtQuick/Controls/Basic", - QStringList() << "ApplicationWindow" << "Calendar"); + QStringList() << "ApplicationWindow" << "Calendar" << "TreeViewDelegate"); } void tst_CreationTime::fusion() diff --git a/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp b/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp index 245f28b145..d99396e7b7 100644 --- a/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp +++ b/tests/benchmarks/quickcontrols2/objectcount/tst_objectcount.cpp @@ -88,8 +88,9 @@ void tst_ObjectCount::cleanup() static void initTestRows(QQmlEngine *engine) { // Calendar is excluded because it's a singleton and can't be created. + // TreeViewDelegate is excluded since it's a delegate that can only be created by TreeView. addTestRowForEachControl(engine, QQC2_IMPORT_PATH, "basic", "QtQuick/Controls/Basic", - QStringList() << "Calendar"); + QStringList() << "Calendar" << "TreeViewDelegate"); addTestRowForEachControl(engine, QQC2_IMPORT_PATH, "fusion", "QtQuick/Controls/Fusion", QStringList() << "ButtonPanel" << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator"); addTestRowForEachControl(engine, QQC2_IMPORT_PATH, "imagine", "QtQuick/Controls/Imagine"); |