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. Dynamic display on GUI
Forum Updated to NodeBB v4.3 + New Features

Dynamic display on GUI

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

    Hi,

    I would like to create on a GUI, a element to display information (like label) in two lines.

    The first message showed in lower line. When the second message arrives, it occupies the lower line, and the first message passes to upper line. When the third one arrives, it occupies the lower line, the second one passes the upper line, the first one disappears. And so forth.

    Maybe we can do this in a messagebox, but it is not embedded in a GUI.

    Does anyone have an idea, please? Thanks!

    1 Reply Last reply
    0
    • JKSHJ Online
      JKSHJ Online
      JKSH
      Moderators
      wrote on last edited by
      #2

      Store 2 strings in memory: topLine and bottomLine.

      When a new line is received, copy the old bottomLine into topLine, and then store the new line in bottomLine:
      @
      void recordNewLine(const QString& newLine)
      {
      topLine = bottomLine;
      bottomLine = newLine;
      }
      @

      Then, display the new topLine and bottomLine. There are many ways -- "QLabel":http://qt-project.org/doc/qt-5.0/qtwidgets/qlabel.html for example.

      Qt Doc Search for browsers: forum.qt.io/topic/35616/web-browser-extension-for-improved-doc-searches

      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