This is the expected behaviour. If you want to have items which follow the window size then you must use bindings, not imperatively set the properties1. If you want to have items which follow the screen size, then bind2 to the Screen attached property http://qt-project.org/doc/qt-5/qml-qtquick-window-screen.html instead of waiting for the window to get it’s final size (a point in time which varies per platform).
[1]This will be easier if you use a QQmlApplicationEngine instead of a QQuickView and have the window constructed in QML, e.g. Window { visibility: Window.FullScreen; visible: true }
[2]You may still have to bind to the screen values, as the items don’t know which screen they’re on until after a certain point in the window setup still. But I think that they’ll know much earlier.
↧