Though QML provides a nice way to design user interfaces, and JavaScript is employed there to implement the application logic and works pretty nice in many cases, we might still need Qt C++ in some situations (well, at least JavaScript has limited access outside its sandbox).
1) integrate QML into Qt C++
Suppose we have a QML file, named “myqml.qml”, like this:// this line should be "import QtQuick 1.0" since Qt 4.7.1
import Qt 4.7
Rectangle {