diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-08-29 14:28:05 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2018-09-06 11:18:12 +0000 |
commit | 083964289448afdbe27f72052077f10c55c47579 (patch) | |
tree | 4609e7202c12c5c6ac38b215ff2d94dbe55fda35 /src | |
parent | 3e27cb8dd5fc7ff238946d9b96891e40cf9981f9 (diff) |
QQuickTableView: let fall back item have a valid size
If we don't set an implicit size on the fall back item, a
warning will be issued about it later in the process. This
is unnecessary, since we've already warned about not being
able to create the item from before.
Change-Id: I39dee52afe5d1918c9ee23204f2bed5315f7b113
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Diffstat (limited to 'src')
-rw-r--r-- | src/quick/items/qquicktableview.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index ce71acc922..110373f95d 100644 --- a/src/quick/items/qquicktableview.cpp +++ b/src/quick/items/qquicktableview.cpp @@ -706,6 +706,8 @@ FxTableItem *QQuickTableViewPrivate::createFxTableItem(const QPoint &cell, QQmlI // Parent item is normally set early on from initItemCallback (to // allow bindings to the parent property). But if we created the item // within this function, we need to set it explicit. + item->setImplicitWidth(kDefaultColumnWidth); + item->setImplicitHeight(kDefaultRowHeight); item->setParentItem(q->contentItem()); } Q_TABLEVIEW_ASSERT(item->parentItem() == q->contentItem(), item->parentItem()); |