Finished the problem with syntax. Iadded : .horizontalCenter. Finished the probllem with file not found. I wrote a new path. Now I have two projects one simple without vewers, the other with viewers. But no one shows any calculator upon 'run".
So it seems something is wrong in Main.cpp. I give you below the two codes:
//main.cpp of quickcalc project
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("/home/sylvain/quickcalc/main.qml"));
//viewer.showExpanded();//origin
viewer.show();
}
//main.cpp of quickcalc project
#include <QtGui/QGuiApplication>
#include "qtquick2applicationviewer.h"
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QtQuick2ApplicationViewer viewer;
viewer.setMainQmlFile(QStringLiteral("/home/sylvain/quickcalc/main.qml"));
//viewer.showExpanded();//origin
viewer.show();
}
To copy to clipboard, switch view to plain text mode
And the other:
//main.cpp of quickc project
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.
load(QUrl(QStringLiteral
("qrc:/main.qml")));
return app.exec();
}
//main.cpp of quickc project
#include <QGuiApplication>
#include <QQmlApplicationEngine>
int main(int argc, char *argv[])
{
QGuiApplication app(argc, argv);
QQmlApplicationEngine engine;
engine.load(QUrl(QStringLiteral("qrc:/main.qml")));
return app.exec();
}
To copy to clipboard, switch view to plain text mode
Bookmarks