[PyKDE] tableview and model
    David Boddie 
    david at boddie.org.uk
       
    Sat Feb 25 13:11:41 GMT 2006
    
    
  
On 25 Feb 2006 11:26:13, Olivier Fournier wrote:
> thank's for your help
>
> ...
>         self.model = QtGui.QStandardItemModel(3,3)
>         self.TVTable.setModel(self.model)
> ...
>
>
> is more correct...
You should also be able to do this:
    model = QtGui.QStandardItemModel(3,3,self)
    self.TVTable.setModel(model)
In this case, Qt will take care of the model instead of Python because self
is being passed as the parent object to the QStandardItemModel. Of course,
the instance represented by self has to be inherit QObject for this to work.
David
    
    
More information about the PyQt
mailing list