Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. I want to Align an item to the right in qml
Forum Updated to NodeBB v4.3 + New Features

I want to Align an item to the right in qml

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 214 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.
  • T Offline
    T Offline
    trupti007
    wrote on last edited by
    #1
    Column {
                        id:column
                        spacing: 10
                        width: parent.width
          Repeater{
              model:5
                           Row {
                                      leftPadding:17
                                      topPadding:10
                                      spacing: 10
                                        Image {
                                                 id:img
                                                  height: 50
                                                  width: 50
                                                  source:"icon.png"
                                         }
                                        Text {
                                            text:"User_name"
                                            topPadding:12
                                       }
                                        Rectangle{
                                            height: 40
                                            width:40
                                            color: "#333333"
                                            Layout.alignment: Qt.AlignRight
                                        }
                                    }
          }
    
      }
    I have Used Layout.alignment: Qt.AlignRight to show the rectangle to the right, But its not working. I don't understand why It is not working, I have also tried Layout.fillWidth: true inside an Item but still not working
    
    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