diff options
author | MohammadHossein Qanbari <[email protected]> | 2024-10-15 16:33:58 +0200 |
---|---|---|
committer | MohammadHossein Qanbari <[email protected]> | 2024-11-27 09:03:42 +0100 |
commit | 0edf656a2ea2c3fec34892b5f878855d0b094af7 (patch) | |
tree | 10e36c01eca41c44c6fd715e9e175cfe179597d4 /tests/benchmarks | |
parent | 77a20c00e64010c661b9121e8c114065ae5346e0 (diff) |
Controls: Add TableViewDelegate
This patch introduces TableViewDelegate to the Controls module.
Key features:
- Ready-made delegate assignable to TableView
- Handles table drawing using predefined styles
- Usable without customization
- Implements all required properties set by TableView
- Provides API for changing background and label
Test Suite:
- Verifies TableViewDelegate properties and functionalities
- Tests include:
- Verification of selected, current, and content text properties
- Validation of selection behavior and item clicking
BLACKLISTing two tests (dragToSelect and pressAndHoldToSelect), which
will be removed from the BLACKLIST in the next patch (to fix cell
selection on the Android platform).
Implementation derived from TreeViewDelegate, adapted for TableView use.
TreeViewDelegate patch: 0ddb0d4b9b0c70c4fd4058ef4660e38fd933523e
[ChangeLog][Controls] New delegate added: TableViewDelegate
Fixes: QTBUG-114636
Change-Id: Ibb8b0a7622016e0c6fd58d696e507e7bb76daced
Reviewed-by: Mitch Curtis <[email protected]>
Diffstat (limited to 'tests/benchmarks')
-rw-r--r-- | tests/benchmarks/quickcontrols/creationtime/tst_creationtime.cpp | 3 | ||||
-rw-r--r-- | tests/benchmarks/quickcontrols/objectcount/tst_objectcount.cpp | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/tests/benchmarks/quickcontrols/creationtime/tst_creationtime.cpp b/tests/benchmarks/quickcontrols/creationtime/tst_creationtime.cpp index 8f525ea766..44edd815e5 100644 --- a/tests/benchmarks/quickcontrols/creationtime/tst_creationtime.cpp +++ b/tests/benchmarks/quickcontrols/creationtime/tst_creationtime.cpp @@ -83,8 +83,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. + // TableViewDelegate is excluded since it's a delegate that can only be created by TableView. addTestRowForEachControl(styleHelper.engine.data(), QQC2_IMPORT_PATH, "basic", "QtQuick/Controls/Basic", - QStringList() << "ApplicationWindow" << "Calendar" << "TreeViewDelegate"); + QStringList() << "ApplicationWindow" << "Calendar" << "TreeViewDelegate" << "TableViewDelegate"); } void tst_CreationTime::fusion() diff --git a/tests/benchmarks/quickcontrols/objectcount/tst_objectcount.cpp b/tests/benchmarks/quickcontrols/objectcount/tst_objectcount.cpp index f4119f0737..1a06cdf629 100644 --- a/tests/benchmarks/quickcontrols/objectcount/tst_objectcount.cpp +++ b/tests/benchmarks/quickcontrols/objectcount/tst_objectcount.cpp @@ -64,8 +64,9 @@ 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. + // TableViewDelegate is excluded since it's a delegate that can only be created by TableView. addTestRowForEachControl(engine, QQC2_IMPORT_PATH, "basic", "QtQuick/Controls/Basic", - QStringList() << "Calendar" << "TreeViewDelegate"); + QStringList() << "Calendar" << "TreeViewDelegate" << "TableViewDelegate"); addTestRowForEachControl(engine, QQC2_IMPORT_PATH, "fusion", "QtQuick/Controls/Fusion", QStringList() << "ButtonPanel" << "CheckIndicator" << "RadioIndicator" << "SliderGroove" << "SliderHandle" << "SwitchIndicator" << "TreeViewDelegate"); |