QQuickWindow: fix content item size
authorJ-P Nurmi <jpnurmi@digia.com>
Fri, 21 Feb 2014 14:04:21 +0000 (15:04 +0100)
committerThe Qt Project <gerrit-noreply@qt-project.org>
Fri, 28 Feb 2014 13:32:47 +0000 (14:32 +0100)
commit0b2d05093c6fc030d40be8c873ad1e0af9bba8cc
treefb3830dd4c8377da665ef6423b84baef85a2fe64
parent10f0485464acebd281f37b78f9ab5d02ee4ada9b
QQuickWindow: fix content item size

Resize content item in QQuickWindow::resizeEvent() instead of using
signals and slots. The signal-slot connections were only established
when child items were added in QML. It should work in C++ too, since
QQuickWindow and QQuickItem are part of the public C++ API and using
them in C++ is a perfectly valid use case.

Resizing the content item in resizeEvent() is not only faster than
using signals and slots, but also in theory a bit more flexible as
one would be able to override the event handler and implement their
own layouting.

Task-number: QTBUG-36938
Change-Id: Id05d4cf6d547021803050633e6f0a3359129a9f3
Reviewed-by: Alan Alpert <aalpert@blackberry.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
src/quick/items/qquickwindow.cpp
src/quick/items/qquickwindow_p.h
tests/auto/quick/qquickwindow/tst_qquickwindow.cpp