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. Text item inside flickable flicks to show all of text but snaps back once mouse is released.
Forum Updated to NodeBB v4.3 + New Features

Text item inside flickable flicks to show all of text but snaps back once mouse is released.

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 211 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.
  • V Offline
    V Offline
    VFCraig
    wrote on last edited by
    #1

    As in, it fails to continue to show the content at the new position once the mouse is released, making it worthless.

    Flickable
    {
    Rectangle
    {
    width: 50
    height: 30
    Text
    {
    text: "A whole bunch of\ntext spanning\nmultiple lines\nwhere content size exceeds containing item\n but sadly ineffective\nin permitting the text to be repositioned\nto show the text at the bottom\nor on the right\nwithout keeping the mouse button held down when flicking."
    }
    }
    }

    Not a complete code segment, but more than enough for any programmer willing to read what is written to understand what the issue is.

    1 Reply Last reply
    0
    • V Offline
      V Offline
      VFCraig
      wrote on last edited by
      #2

      Problem not solved, but identified. The contentHeight of the flickable region is set to the height returned by the bounding rect of the text. Seems FontMetrics.boundingRect does not take into account newline characters, so the returned width is over 15,000 pixels wide but the height is 20, the height of a single line at the designated font point size. Though even this obvious bug in QML does not explain why even trying to scroll right would snap back to the origin when the mouse was release.

      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