[PyQt] Model/View programming
Philippe Crave
philippe.crave at gmail.com
Thu May 6 13:45:51 BST 2010
Hello,
I am reading the chapter 14 of Mark Summerfield.
I work with custom model and custom delegate.
in the sample from the book, we have 1 tableView linked to one model.
It's simple to get 2 tableView linked to the same model.
my Model has got 4 columns.
I would like that TableView_1 show the 2 first column only, and
TableView_2 show the 2 others.
what is the good way to do it ?
actually, the content of the model will be given to the view in the
data(self, index, role=Qt.DisplayRole) method from the custom model.
is there a way to know which view needs data in that data method ?
thanks,
Philippe
More information about the PyQt
mailing list