Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. How to create two rectangle side by side in Qt Quick

How to create two rectangle side by side in Qt Quick

Scheduled Pinned Locked Moved QML and Qt Quick
1 Posts 1 Posters 704 Views
  • 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 Offline
    H Offline
    houmingc
    wrote on last edited by
    #1

    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
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved