[PyKDE] [PyQt]: how to refresh a QTreeView widget?
Oscar Cossu
zerozerosette at gmail.com
Fri Sep 8 09:38:51 BST 2006
thank you for the advice, I have read the doc again (and again and again).
Now, I use a QTreeView ,what i have to do ?
QTreeView::rowsAboutToBeRemoved(param)
treeviewobj.model().removeRow(param)
QTreeView::rowsRemoved(param)
or just call removeRow() that call itself beginRemoveRow and endRemoveRow ?
2006/9/7, Andreas Pakulat <apaku at gmx.de>:
>
> On 07.09.06 16:44:23, Oscar Cossu wrote:
> > Hy all, I set the model of a QTreeView with an object that is a
> subclass of
> > QAbstractItemModel.
> > When I change the model (ex. deleting a row) and emit layoutChanged()
> > signal, the treeModel should update the view, but errors occur.
>
> Read the Qt documentation on model/view again. You shouldn't use
> layoutChanged() but call QAbstractItemModel::beginRemoveRows() and
> ::endRemoveRows (the same for inserting rows).
>
> Andreas
>
> --
> Accent on helpful side of your nature. Drain the moat.
>
> _______________________________________________
> PyKDE mailing list PyKDE at mats.imk.fraunhofer.de
> http://mats.imk.fraunhofer.de/mailman/listinfo/pykde
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20060908/56cd5d5c/attachment.html
More information about the PyQt
mailing list