Results 1 to 2 of 2

Thread: TableViewColumn

  1. #1
    Join Date
    Apr 2009
    Posts
    206
    Thanks
    34
    Thanked 2 Times in 2 Posts

    Default TableViewColumn

    Hello friends,

    is it possible to add/change dynamically TableViewColumns to/from the tableview.
    The problem is when I change the datasource of my model the columns is also changing.

    In the examples I see only static defined columns

    Qt Code:
    1. TableView {
    2. id: myTableView
    3. anchors.fill: parent
    4. sortIndicatorVisible: true
    5. frameVisible: true
    6. headerVisible: true
    7. alternatingRowColors: true
    8.  
    9. TableViewColumn { role: "a"; title: "A"; }
    10. TableViewColumn { role: "b"; title: "B"; }
    11. TableViewColumn { role: "c"; title: "C"; }
    12. model: myModel
    13. ...
    14. ...
    15. }
    To copy to clipboard, switch view to plain text mode 

  2. #2
    Join Date
    Apr 2013
    Posts
    3
    Thanked 1 Time in 1 Post
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Windows

    Default Re: TableViewColumn

    check out this link i tmight be of help as it was for me.

    http://qt-project.org/wiki/QML-Dynamic-Objects

    and this other.

    http://qt-project.org/doc/qt-5/qml-q...tableview.html

    good look!!!

  3. The following user says thank you to usva.techdev for this useful post:

    codeman (15th April 2014)

Similar Threads

  1. Replies: 9
    Last Post: 8th November 2016, 07:20

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.