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. regarding regarding approach using QTreeView and QTreeWidget of QT
Qt 6.11 is out! See what's new in the release blog

regarding regarding approach using QTreeView and QTreeWidget of QT

Scheduled Pinned Locked Moved Unsolved General and Desktop
qt5.4
4 Posts 2 Posters 2.0k 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.
  • Q Offline
    Q Offline
    Qt Enthusiast
    wrote on last edited by
    #1

    regarding which Widgets of QT

    I have a requirement in Which the window is splitted vertically in two parts . Left part has to be tree view where each node can have multiple children and Right Side should be table of two columns. This tables gets populated updated when we click any child of tree of the left side for example. Now if click on b then

    Tree View | Table at the right
    A | Colum1 -- Colulm2
    ---- b |Row 1-------------------------------
    ---- c |------------------------ Row2--------------
    B |---------------------Row3_
    --- d |
    -- e |

    Now what solution could be optimal

    On Left side I planning to use my QTreeView and on Right side I am planning to use a QTableView with my own custmodel

    Is this the right approach

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

      Hi,

      That really depends on what your QTreeXXX object should contain and how you get it.

      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
      0
      • Q Offline
        Q Offline
        Qt Enthusiast
        wrote on last edited by
        #3

        Does using QTableView for table on right side will solve the purpose

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

          If you have the need to show tabular data on two columns then yes QTableView is the right tool. After that, what kind of model will you be using ? How much data will be shown ? Depending on that QTableWidget might be enough.

          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
          0

          • Login

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