I have experience with developing rich user interface application with flex and AS3. However the issue is its very hard to use existing c++ business logic with these flex apps. With the advent of QML, I am curious whether its possible to reuse the c++ business logic with QT for rich UI apps.
I want to know whether its possible to develop full screen rich user interface applications(which are becoming more and more common especially in mobile devices) for the desktop. For example(http://blog.flexexamples.com/2007/08/07/creating-full-screen-flex-applications/) Adobe has the Flash Player which can be used in full screen mode and runs content written in AS3. Is it possible to write similar applications using QT/QML?
There is also a QML-only way to go fullscreen. You can use this if you are not using QDeclarativeView but QQmlApplicationEngine, since the latter doesn't inherits QWidget and has not the method showFullScreen().
But it's important to use ApplicationWindow as the root-element and not Rectangle. For ApplicationWindow you have to import QtQuick.Controls.
If you would like to use business logic written on C++ and some QML user interface you can use
QDeclarativeView
inside your application. It's just a regular Qt widget so it has methodshowFullScreen()
. Actually this class is like "qmlviewer inside your application".So you'll get something like this:
You can find more information here.
Here is yet another variation from previous answers, but this uses the (default Qt Quick Application - Empty) Window QML type and a Qt enum:
When using QQmlApplicationEngine in c++ you can do something like this in QML:
main.cpp
main.qml
Tested with QT5.8
Qt has qmlviewer.
To run it in fullscreen:
Also there is a tutorial of creating fullscreen applications with QML. And components for desktop widgets.