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 can I add a widget right in the bottom of the QWidget that has the QScrollArea as a parent?
Forum Updated to NodeBB v4.3 + New Features

How can I add a widget right in the bottom of the QWidget that has the QScrollArea as a parent?

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 188 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
    DmitryMaslov
    wrote on last edited by
    #1

    I am making my chat application. Every new QLabel containing a message is added in the bottom of his parent widget. I think you understand how a chat works like

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi and welcome to devnet,

      You could use a QGridLayout however, writing a chat application using QLabel is a bad idea. You are going to generate too much widgets at some point.

      The usual technique is to use model views to render all of that. It will be lighter weight in terms of resources as well as simpler to manage in terms of data handling.

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      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