path: root/tests
diff options
authorRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-02-19 15:56:38 +0100
committerRichard Moe Gustavsen <richard.gustavsen@qt.io>2020-03-10 08:51:31 +0100
commit6cdd4b53031de17b36b30b00de0a6945470a35ad (patch)
treeca5546c6c8e3a97ed657a0122e52dc7b55fb9f18 /tests
parent9f093c8e491b647928d01580761238e931d3ea13 (diff)
HeaderView: set implicitSize on the style itemsv5.15.0-beta2
By setting an implicit size, the user don't need to set a width or height on a HeaderView himself, but it will get the default size recommended by the style. By doing it the way it's done in the patch we achieve the following: 1. A HeaderView will by default be resized to be the same size as the delegate. 2. If the application sets a size on HeaderView it that is larger than the implicit size of the delegate, the delegate will be resized to have the same size (effectively filling out the free space in the header). 3. If the size of HeaderView is smaller than the implicit size of the delegate, the delegate will simply be clipped. (effectivly saying that the implicitSize of the delegate is also it's minimum size). If this is not acceptable for the application, it will need to use a custom delegate. Since a HeaderView delegate is a component and not an item, it should not be a part of the sanity checks we do to avoid using internal IDs. Hence we blacklist until we have a better way of handling such cases. Task-number: QTPM-1300 Change-Id: I30ca3e13ce5e1371b60f5c4ecf742a7d7e794a36 Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Diffstat (limited to 'tests')
2 files changed, 20 insertions, 4 deletions
diff --git a/tests/auto/sanity/BLACKLIST b/tests/auto/sanity/BLACKLIST
index 42ad3448..2a157b87 100644
--- a/tests/auto/sanity/BLACKLIST
+++ b/tests/auto/sanity/BLACKLIST
@@ -2,3 +2,23 @@
diff --git a/tests/manual/headerview/main.qml b/tests/manual/headerview/main.qml
index 2919f1b2..ab9c3dc5 100644
--- a/tests/manual/headerview/main.qml
+++ b/tests/manual/headerview/main.qml
@@ -101,8 +101,6 @@ Window {
HorizontalHeaderView {
id: horizontalHeader
objectName: "horizontalHeader"
- height: contentHeight
- width: syncView.width
anchors.top: parent.top
anchors.left: tableView.left
syncView: tableView
@@ -112,8 +110,6 @@ Window {
VerticalHeaderView {
id: verticalHeader
objectName: "verticalHeader"
- width: contentWidth
- height: syncView.height
anchors.top: tableView.top
syncView: tableView
clip: true