Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QML text scroll
Qt 6.11 is out! See what's new in the release blog

QML text scroll

Scheduled Pinned Locked Moved General and Desktop
2 Posts 2 Posters 3.8k 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.
  • R Offline
    R Offline
    rodrigob
    wrote on last edited by
    #1

    Hello !

    I am using C++ and QML to create a nice interface. I would like to have a "console view", where plenty to text is printed through time. However, when the text of a text item or webview content grows, the view does not "scroll down".

    How can I make the text on the bottom of the text/webview item always stay visible ?

    I have tried playing with flickable and the_webview.evaluateJavaScript + window.scrollTo , but I could not get them to do what I want. This seems a fairly simple piece of UI, but I am having serious troubles to do it with QML.

    Thanks for you answer.

    ps: I also asked at http://stackoverflow.com/questions/5395106/qml-text-scroll but still waiting for a satisfying answer

    1 Reply Last reply
    0
    • A Offline
      A Offline
      andre
      wrote on last edited by
      #2

      On stackoverflow, there was an answer that inspired rodrigob to this:

      [quote]
      @
      function scroll_to_bottom() {

      flickabe_item.contentY =
      Math.max(0, webview_item.height - flickabe_item.height)
      return;
      }
      @
      [/quote]

      Just for reference. Would have been nice if you reported that back here as well, rodrigob.

      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