regarding regarding approach using QTreeView and QTreeWidget of QT



  • 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


  • Lifetime Qt Champion

    Hi,

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



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


  • Lifetime Qt Champion

    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.


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.