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. This Flickable won't flick or drag
Forum Updated to NodeBB v4.3 + New Features

This Flickable won't flick or drag

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

    I'm trying to understand how Flickable works. I have this, which is embedded in a small rectangle on the screen, thus the text is much larger than the rectangle:

    @Flickable{
    width: parent.width*.9
    height: parent.height*.9
    anchors.centerIn: parent
    contentHeight: sales.height
    contentWidth: width
    clip: true
    Text {
    id:sales
    width: parent.width
    height: parent.height
    text: //.... a huge amount of text here, many many lines
    wrapMode: Text.Wrap
    }
    }@

    I've tried setting various properties on Flickable, but on Windows at least nothing I do allows the text to be dragged around, even though it obviously flows off the screen. What is the expected behavior, click and drag, or mouse scroll wheel or trackpad, or both?

    1 Reply Last reply
    0
    • Q Offline
      Q Offline
      qttester5
      wrote on last edited by
      #2

      I found the issue. Because I hard-coded the height of the Flickable's child, the Text element, there was no content larger than the Flickable to scroll through.

      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