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 add status line under QTableView ?
Qt 6.11 is out! See what's new in the release blog

How to add status line under QTableView ?

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 623 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.
  • P Offline
    P Offline
    PetQter
    wrote on last edited by
    #1

    Hello,

    my application contains QTableView derived class responsible for displaying network connections in realtime. There is used model/view mechanism and my model is derived from QAbstractTableModel.
    I'd like to add status line in right bottom corner displaying number of all connections.

    What is the simplest way to do it ?

    I was not successful with adding QLabel because it covers table content. I had idea to create modeless dialog and place QTableView derivate into it but I prefer more simple way if exist.

    What do you recommend ?

    JKSHJ 1 Reply Last reply
    0
    • P PetQter

      Hello,

      my application contains QTableView derived class responsible for displaying network connections in realtime. There is used model/view mechanism and my model is derived from QAbstractTableModel.
      I'd like to add status line in right bottom corner displaying number of all connections.

      What is the simplest way to do it ?

      I was not successful with adding QLabel because it covers table content. I had idea to create modeless dialog and place QTableView derivate into it but I prefer more simple way if exist.

      What do you recommend ?

      JKSHJ Offline
      JKSHJ Offline
      JKSH
      Moderators
      wrote on last edited by
      #2

      @PetQter said in How to add status line under QTableView ?:

      I'd like to add status line in right bottom corner displaying number of all connections.

      What is the simplest way to do it ?

      I was not successful with adding QLabel because it covers table content.

      Use a QVBoxLayout. Add your QTableView and QLabel to the layout.

      https://doc.qt.io/qt-5/qtwidgets-layouts-basiclayouts-example.html

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

      P 1 Reply Last reply
      5
      • JKSHJ JKSH

        @PetQter said in How to add status line under QTableView ?:

        I'd like to add status line in right bottom corner displaying number of all connections.

        What is the simplest way to do it ?

        I was not successful with adding QLabel because it covers table content.

        Use a QVBoxLayout. Add your QTableView and QLabel to the layout.

        https://doc.qt.io/qt-5/qtwidgets-layouts-basiclayouts-example.html

        P Offline
        P Offline
        PetQter
        wrote on last edited by PetQter
        #3

        @JKSH I created QWidget and then followed your recommended way. Solved, Thanks !

        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