Quantcast
Channel: Qt DevNet forums: Qt Quick 1283365070**
Viewing all articles
Browse latest Browse all 4972

[PROBLEM]::can't find a way to cooperate with .cpp file

$
0
0
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(); }

Viewing all articles
Browse latest Browse all 4972

Trending Articles