When QQuickView acquires a default initial size while waiting for
the source component to be loaded, the resulting width() and height()
are 1 rather than zero. Fix the check for default size after component
has loaded to account for this disparity.
Change-Id: Ifaf418525e66dcc094c87ac1f9b63d1b05a08fd7
Reviewed-by: Martin Jones <martin.jones@nokia.com>
}
if (root) {
initialSize = rootObjectSize();
- if ((resizeMode == QQuickView::SizeViewToRootObject || !q->width() || !q->height())
- && initialSize != q->size()) {
+ if ((resizeMode == QQuickView::SizeViewToRootObject || q->width() <= 1 || q->height() <= 1) &&
+ initialSize != q->size()) {
q->resize(initialSize);
}
initResize();