Results 1 to 2 of 2

Thread: Running QML with C++

  1. #1
    Join Date
    Oct 2010
    Posts
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Running QML with C++

    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?

  2. #2
    Join Date
    Nov 2010
    Posts
    315
    Thanked 53 Times in 51 Posts
    Qt products
    Qt4
    Platforms
    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 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!

Similar Threads

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

Bookmarks

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.