Commit b0c0cbbc authored by Jens Bache-Wiig's avatar Jens Bache-Wiig Committed by The Qt Project
Browse files

Don't draw anything in TableView unless there is a column


I was really confused because after assigning a model it looked like
the table view was showing the data, while in reality it was
just filling up with alternating row colors. I think it is
better not to draw anything to ensure that people correctly add
a TableViewColumn.

Change-Id: I353b478f4af80410aca3f94439a02ed7ab53f6d6
Reviewed-by: default avatarJ-P Nurmi <jpnurmi@digia.com>
Reviewed-by: default avatarCaroline Chao <caroline.chao@digia.com>
parent bb7ba4d6
Branches
Tags
No related merge requests found
Showing with 2 additions and 1 deletion
...@@ -304,8 +304,9 @@ ScrollView { ...@@ -304,8 +304,9 @@ ScrollView {
anchors.topMargin: tableHeader.height anchors.topMargin: tableHeader.height
anchors.fill: parent anchors.fill: parent
currentIndex: -1 currentIndex: -1
visible: columns.length > 0
interactive: false interactive: false
SystemPalette { SystemPalette {
id: palette id: palette
colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled colorGroup: enabled ? SystemPalette.Active : SystemPalette.Disabled
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment