PDA

View Full Version : Running QML with C++



adrianhill102
10th January 2011, 18:11
Hi,

I'm trying to run the 'Minehunt' demo in SDK 4.7 but get the following error:

file:///C:/Qt/2010.05/qt/demos/declarative/minehunt/minehunt.qml:109: ReferenceError: Can't find variable: tiles
file:///C:/Qt/2010.05/qt/demos/declarative/minehunt/minehunt.qml:98: ReferenceError: Can't find variable: isPlaying
file:///C:/Qt/2010.05/qt/demos/declarative/minehunt/minehunt.qml:91: ReferenceError: Can't find variable: numFlags
file:///C:/Qt/2010.05/qt/demos/declarative/minehunt/minehunt.qml:85: ReferenceError: Can't find variable: numMines
file:///C:/Qt/2010.05/qt/demos/declarative/minehunt/minehunt.qml:60: ReferenceError: Can't find variable: tiles

I run it using: qmlviewer minehunt.qml

Haved tried building the .exe with QCreator and Qmake/make but makes no difference. The .exe is built correctly.

Any ideas?

MarekR22
12th January 2011, 14:37
Simple. This qml demo shows how to run qml file from C++ code.
Just open minehunt.pro file in qt creator or run qmake and mingw32-make (or nmake) in C:/Qt/2010.05/qt/demos/declarative/minehunt/directory to create required executable.
Not all declarative demos should be run by qmlviewer!