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. Positioning text right after word wrapped text
Forum Updated to NodeBB v4.3 + New Features

Positioning text right after word wrapped text

Scheduled Pinned Locked Moved QML and Qt Quick
2 Posts 1 Posters 592 Views 1 Watching
  • 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.
  • B Offline
    B Offline
    boogerlad
    wrote on last edited by
    #1

    @ListView
    {
    anchors.fill: parent
    model: ContactModel {}
    delegate: Item
    {
    width: parent.width
    height: toopis.height + pls.height + 10
    Text
    {
    id: toopis
    anchors.left: parent.left
    anchors.right: bonehead.left
    anchors.rightMargin: 10
    text: name
    color: "black"
    font.pointSize: 24
    wrapMode: Text.WrapAnywhere
    font.family: "Segoe UI"
    }
    Text
    {
    id: bonehead
    anchors.right: parent.right
    text: price
    color: "black"
    horizontalAlignment: Text.AlignRight
    font.pointSize: 24
    font.family: "Segoe UI"
    }
    Text
    {
    id: pls
    anchors.top: toopis.bottom
    color: "#C8C8C8"
    text: "wow"
    font.pointSize: 24
    font.family: "Segoe UI"
    }
    }
    }@
    produces !http://i.imgur.com/79PBgk5.png(bad)!

    However, I want something like this !http://i.imgur.com/FcI5j75.png(want)!
    I've tried using the Flow element to no avail. Nesting the Text element didn't work either. The reason why they can't be part of the same Text element is because of the font differences.

    1 Reply Last reply
    0
    • B Offline
      B Offline
      boogerlad
      wrote on last edited by
      #2

      Solved. Used html to do the formatting. Rich text will kick in and things will work wonderfully.

      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