How to create two rectangle side by side in Qt Quick



  • I am a new qml programmer, following the link at
    http://qt-project.org/doc/qt-4.8/qml-rectangle.html import QtQuick 1.0
    @
    Rectangle {
    width: 100
    height: 100
    color: "red"
    border.color: "black"
    border.width: 5
    radius: 10
    }
    @
    I can run the above code but i can't run the code below. My objective is to create two Rectangle side by side
    @
    Rectangle {
    color: "#00B000"
    width: 80; height: 80
    }

    Rectangle {
    color: "steelblue"
    y: 100; width: 80; height: 80

    }
    @
    I find my code in Qt Quick UI cannot work in Qt Widget Application


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.