QQuickView in fullscreen
-
Hi everyone,
I was looking for a way to implement fullscreen support such as the fullscreen button on OSX as well as on Windows but I didn't find any good answer so I was wondering if anyone knows a way to simply add the fullscreen button in a QQuickView ?
Thanks
-
Try changing to SizeRootObjectToView: http://qt-project.org/doc/qt-5.0/qtquick/qquickview.html#resizeMode-prop
-
-Since i remember SizeRootObjectToView will still not be fullscreen except you set the width and height of the top-level object to your full-screen resolution.-
Nevermind, found out that it'll resize the top-level object.
bq. If this property is set to SizeRootObjectToView, the view will automatically resize the root item to the size of the view.
-
In Qt 5.3 the QQuickView has a showFullScreen method that to what the name suggest without setting any special flag.
Of course, you still need to resize your root object correctly or let the QQuickView resize it for you specifying SizeRootObjectToView
It works on Windows and Mac.