Change-Id: Ic4066d133ef16ce8cf11fcb9fb5ddcc19599e85d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
// parent size. WE MIGHT HAVE TO REVISIT THESE FALLBACKS.
if (itemSize.isEmpty()) {
itemSize = QSize((int)item->implicitWidth(), (int)item->implicitHeight());
- if (itemSize.isEmpty())
+ if (itemSize.isEmpty() && item->parentItem())
// ### Seems that the above fallback is not enough, fallback to use the parent size...
itemSize = QSize((int)item->parentItem()->width(), (int)item->parentItem()->height());
}