I have a ListModel I update from LocalStorage, it has a variable amount of columns and rows at run-time, I tried to use TableView, it is a Quick.Controls 1.x, and the 2.0 control is not out yet, and I could not figure out how to make the columns clickable with TableView, and I found examples of how to sort the columns, most use C++ to do this, and I did not want to do that, unless I can find no other way, I just want to be able to update a ListModel as a source to some control that can also list all the columns, and make the cells clickable, I do not need to edit them, but at least click on, so I can run an event, but I need the Header Columns to be clickable, so I can change the Model, which I clear it, and read it in from LocalStorage using Sqlite query, so all the data comes from Sql, but uses ListModel.append to populate the model, so it is doing a sort, without have to actually sort the list view, so I hope that someone has an example of doing something like this, TableView works now, I just cannot figure out how to capture header column clicks with it, if there is a way to use the delegate with an AppButton, that would be nice.
I posted this as a Qml question, but help yet, this example uses two ListModel’s and a TableView and two push buttons to switch between the Model:
and here at Qt, I have a lot of unanswered questions at that forum, so I posted it at StackOverflow also.
https://forum.qt.io/topic/101507/how-to-change-models-using-tableview-column-click-event
Thanks for any help.