[PyKDE] QtGui.QItemSelectionModel.NoUpdate problem

Dave S eric3 at pusspaws.net
Sat Oct 14 12:54:13 BST 2006


On Saturday 14 October 2006 12:12, Andreas Pakulat wrote:
> On 14.10.06 10:32:46, Dave S wrote:
> > I have a Qtabelwidget and want it so that when someone clicks on an cell
> > no selection is made. Looking around ...
> >
> > self.tableWidget.setSelectionModel(QtGui.QItemSelectionModel.NoUpdate)
> >
> > seemed to be the option. However I get 'arg 1 - set selection model has
> > invalid type' I cant get round this.QItemSelectionModel is part of QtGui.
> > It is in PyQt docs so It is implemented.
>
> Please try to read the docs again. QItemSelectionModel.NoUpdate is a
> selection flag, which can be set on the QItemSelectionModel.
> setSelectionModel needs to get a QItemSelectionModel instance, not a
> SelectionFlag.
>
> And last but not least: You're actually looking for setSelectionMode and
> the selection mode "NoSelection" both are members of the
> QAbstractItemView class.

Thanks for the heads up

You will be glad to hear that my QT3 > QT4 GUI conversion has (when this 
works) been completed :)

I could not have done it without the help of this list

A big thank you

Dave








>
> Andreas




More information about the PyQt mailing list