QtQuick Designer - not aligned in a grid layout
Solved
QML and Qt Quick
-
Hello forum,
I am trying to follow the presentation hosted by Thomas Hartman that demonstrate the QtQuick Designer. I am creating the following layout( grid layout) using QtQuick Designer:
import QtQuick 2.5 Rectangle { width:400 height:400 Grid { x: 74 y: 68 Rectangle { id: rectangle1 width: 115 height: 63 color: "#a05252" } Rectangle { id: rectangle2 width: 115 height: 63 gradient: Gradient { GradientStop { position: 0 color: "#cd1c1c" } GradientStop { position: 1 color: "#000000" } } } Rectangle { id: rectangle3 width: 115 height: 63 color: "#52a056" } Rectangle { id: rectangle4 width: 115 height: 63 gradient: Gradient { GradientStop { position: 0 color: "#33b18e" } GradientStop { position: 1 color: "#000000" } } } } }
But in the design mode it shows the following(row layout) instead:
Any idea what is it that I am doing wrong here ?
Thanks
-
What are you trying to accomplish?
It seems right to me ....
The grid starts at 74,68....Regards!
-
Sorry for the misunderstanding! I wanted to match the output of the video I am watching
Then I define the number of columns to be 2 and then it matched the output as demonstrated in the video