Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct
Qt Quick Game Programming
The guys in QUIt Coding have released an excellent crash course "guide":http://quitcoding.com/?page=work#qtquick to game development using Qt Quick and C++ bindings. The tutorial builds around a complete game "example":http://quitcoding.com/?page=work#5inarow.
Notice, that if you try to compile the example in the newest Qt SDK for Windows (2010.05), you may run into compilation problems. Make sure that you comment out "#include <QDeclarativeItem>" from mainwidget.h and move the qmlRegisterTyle<...> from mainwidget.cpp to main.cpp (e.g. after the app initialization) and add #include <QDeclarativeComponent> and #include "tile.h" there as well. You also need to play around with copying the .qml and image files appropriately, since Qt Creator makes an own compilation directory on Windows platform. Or you can create a resource file and put the qml's and images there and adjust the loading of the files accordingly (little more work).
Kim Grönholm from QUIt Coding pointed out that a simpler fix is to move the #include <QDeclarativeItem> from mainwidget.h to mainwidget.cpp before the #include <QGLFormat>. Then it compiles. He also reported this as a bug in Qt itself.
kkrzewniak last edited by
Thank You for posting such interesting articles :D You are the man.
Kim informed me that the issue has been addressed and is fixed in Qt 4.7.1