alexeyprog
alexeyprog

Reputation: 816

QAbstractTableModel as a model for one QTableView and few QListViews

Salut, community!

Briefly.

I wrote usual model over QAbstractTableModel and using it in usual way for QTableView. But I think I need to use some columns of this model for the few QListViews in QWizard to fill main table in the right way (for user).

For example: use the column2 as the QListView's model on the page1 of the wizard; column3 for page2 for its QListView etc.

Please, help me to understand just two things:

  1. Am I on the right way?
  2. If yes then how can I make it simply and explicitly?

Upvotes: 2

Views: 425

Answers (1)

alexisdm
alexisdm

Reputation: 29896

Set the QTableModel as the model for each QListView, and use QListView.setModelColumn to choose which column they each display.

Upvotes: 2

Related Questions