Release version not working when using Window instead of Rectangle as top element
-
I had some issues running my application until I decided to try to use Rectangle as top element (instead of Window).
Do I need to add something to my .pro file to make it work with Window
Here is my .pro so far
@
Add more folders to ship with the application, here
folder_01.source = qml/octopusTutorial
folder_01.target = qml
DEPLOYMENTFOLDERS = folder_01Additional import path used to resolve QML modules in Creator's code model
QML_IMPORT_PATH =
The .cpp file which was generated for your project. Feel free to hack it.
SOURCES += main.cpp
Installation path
target.path =
Please do not modify the following two lines. Required for deployment.
include(qtquick2applicationviewer/qtquick2applicationviewer.pri)
qtcAddDeployment()
@Thanks for any help.
-
which class do you use, qquickview or qqml...engine, in main.cpp?
check docs of ApplicationWindow. -
Here are my include in the main.cpp file
@
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
#include <QWindow>
@ -
'With Qt Quick Controls, declare an ApplicationWindow as the root item of your application and launch it by using the QQmlApplicationEngine instead'
@#include <QApplication>
#include <QQmlApplicationEngine>int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QQmlApplicationEngine engine("main.qml");
return app.exec();
}@ -
make sure the visible property be true,and not all qquick control works in normal itemsuch as Rectangle.