I want to be able to change the text, of text edits in my qml file, from my .cpp file; and the values of variables in my .cpp file, from the mouse areas in my qml file… Yet i can’t seem to be able to find a way to do this.
main.cpp:
#include <QtGui/QApplication>
#include "qmlapplicationviewer.h"
Q_DECL_EXPORT int main(int argc, char *argv[])
{
int p1pts;
int p2pts;
int p1unaddedpts;
int p2unaddedpts;
QScopedPointer<QApplication> app(createApplication(argc, argv));
QmlApplicationViewer viewer;
viewer.setOrientation(QmlApplicationViewer::ScreenOrientationLockPortrait);
viewer.setMainQmlFile(QLatin1String("qml/counter/main.qml"));
viewer.showExpanded();
return app->exec();
}
↧