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. How to get text Scrolling up in QLabel
Qt 6.11 is out! See what's new in the release blog

How to get text Scrolling up in QLabel

Scheduled Pinned Locked Moved General and Desktop
3 Posts 3 Posters 5.2k Views 3 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
    bwcal1999
    wrote on last edited by
    #1

    Im newish to QT but a long time C++ programer. I have a QT program that I developed in Ubuntu Linux that attaches to some very high end test equipment. At some points my program just runs scripts that I wrote for the command line that interact with the test equipment. At times its just endless output giving status Id like to keep displaying that output in my qt program. I can get the stdout easily by usingreadAllStandardOutput() and can display it to a large qtlabel. After about 20 lines it stops displaying because it doesn't fit.

    How can i make my text scroll up so it keeps continually keeps displaying the new output?

    Is there something other than a Qlabel i should be using? I could write my own function but i'd like to learn a better way.

    1 Reply Last reply
    0
    • HamedH Offline
      HamedH Offline
      Hamed
      wrote on last edited by
      #2

      Hi
      Take a look at this link : http://doc.qt.io/qt-5/qtextedit.html
      QTextEdit inherits from QAbstractScrollArea and I'm pretty sure it would solve your problem.

      HamedBabaeyan@yahoo.com
      for more interesting stuff

      1 Reply Last reply
      1
      • mrjjM Offline
        mrjjM Offline
        mrjj
        Lifetime Qt Champion
        wrote on last edited by
        #3

        Hi
        And not to forget its sister
        QPlainTextEdit that is optimized for non formatted text.

        1 Reply Last reply
        1

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved