Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    How to create two rectangle side by side in Qt Quick

    QML and Qt Quick
    1
    1
    616
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • H
      houmingc last edited by

      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

      1 Reply Last reply Reply Quote 0
      • First post
        Last post