Search code examples
qtqtableviewqt4.7qt4.8qpushbutton

Qt - How to expand or Collapse my QTableView


I have a QTableView with some items in it. If i click on any row, that particular row has to expand with some QPushButtons in it. I had attached the screen shot of it. How can i achieve this? Need ur help. Thanks in Advance.enter image description here


Solution

  • This could easily be done with QML.

    If you check out the Models and Views: ListView Example, the expanding delegates example does exactly what you need.

    The picture that you describe above could be built in QML as QML ListView with embedded QML Row Elements.