Using Qt's Model/View pattern on custom UIs



  • I want to use Qt's Model/View pattern on my custom qt quick based UIs but I couldn't find any way how implement it.

    As I understand it, QAbstractItemModel designed for models that based on list, table, tree etc. But my UI will show data which change instantaneously (i.e. instant gps data).For instance,I will show last gps info coming from GPS module on map and table.

    What way should I follow in this scenario? Should I implement my design according to QAbstractItemModel or custom 'Model View Controller' pattern without QAbstractItemModel, DelegateModel etc.?



  • As you want to display GPS info in the table and you did not mention the size of the data, I assume you might get multiple rows in table. So I suggest to create QAbstractItemModel , Tableview and delegate. You can use same model to display in map.



  • I will show one datasets at the same time. This data periodically updated. So I haven't any list.


Log in to reply
 

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