Results 1 to 2 of 2

Thread: Running QML with C++

  1. #1
    Join Date
    Oct 2010
    Qt products

    Default Running QML with C++


    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?

  2. #2
    Join Date
    Nov 2010
    Thanked 53 Times in 51 Posts
    Qt products
    Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: Running QML with C++

    Simple. This qml demo shows how to run qml file from C++ code.
    Just open 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!

Similar Threads

  1. Problem running QT4.5
    By raghvendramisra in forum Installation and Deployment
    Replies: 3
    Last Post: 6th June 2009, 19:10
  2. Running the *.exe
    By dyonis in forum Qt Programming
    Replies: 1
    Last Post: 20th May 2009, 05:18
  3. Replies: 1
    Last Post: 17th May 2006, 00:23
  4. running moc on what?
    By Morea in forum Qt Programming
    Replies: 2
    Last Post: 23rd February 2006, 10:14
  5. running both Qt3 & Qt4
    By impeteperry in forum Qt Programming
    Replies: 1
    Last Post: 8th February 2006, 18:59


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.