You misunderstand how QML is supposed to be used. It's nothing at all like building a web app. Its biggest problem right now is that there aren't any good books about how to use it correctly, and what your overall design philosophy should be.
If we are to stay with the web analogy, in terms of usefulness QML/C++ is to plain C++ like CSS/HTML is to plain HTML. Positioning, reacting to changes, tasteful animations etc. are all extremely simple in a declarative UI. Explaining how to use it would be too much for one post, but it's becoming so powerful you'll soon be able to manipulate your UI using shaders. I've added comments to explain the basic QML, but the original article is here.
Image { // Create a new image object
width: 180
height: 180
source: "winter.jpg"
Text { // Create a new text object parented to the image object
id: theItem // Give this object an id to refer to
anchors.fill: parent // Automatically and constantly adjust to the size of the parent
horizontalAlignment: Text.AlignHCenter
verticalAlignment: Text.AlignVCenter
font.pixelSize: 120
font.family: "Times"
color: "blue"
text: "Qt"
}
ShaderEffectItem { // Create a new ShaderEffectItem object
anchors.fill: parent // Automatically and constantly adjust to the size of the parent
property variant source: ShaderEffectSource {
sourceItem: theItem // The object that the shader will draw
smooth: true
hideSource: true
}
property real amplitude: 0.02 // Define new variables for the shader to interact with.
property real frequency: 20
property real time: 0
NumberAnimation on time { loops: Animation.Infinite; from: 0; to: Math.PI * 2; duration: 600 } // Animate the time variable. You can also make animations that automatically animate objects' size changes when you do, say, width = 300.
fragmentShader: " // Embedded fragment shader code
uniform highp float amplitude;
uniform highp float frequency;
uniform highp float time;
uniform sampler2D source;
uniform lowp float qt_Opacity;
varying highp vec2 qt_TexCoord0;
void main() {
highp vec2 p = sin(time + frequency * qt_TexCoord0);
gl_FragColor = qt_Opacity * texture2D(source, qt_TexCoord0 + amplitude * vec2(p.y, -p.x));
}"
}
}