[PyQt] problem with setItemDelegateForColumn and
ItemIsUserCheckable
Brian DeWeese
brian.deweese at gmail.com
Fri Jun 8 14:09:27 BST 2007
David,
Thanks for looking into the problem. I upgraded to PyQt 4.2, Qt 4.3 and
then I got the same results that you did. It worked correctly using
setItemDelegateForColumn(). I double checked what my previous version of Qt
was and it was 4.2.1. So it appears that this may have been a bug that was
fixed in version 4.2.2.
Brian DeWeese
On 6/7/07, David Boddie <david at boddie.org.uk> wrote:
>
> On Wednesday 06 June 2007 10:00:10 -0500, Brian DeWeese wrote:
>
> > Thanks for your reply. I was passing a QObject (a QDialog to be exact)
> as
> > the parent to the delegate but I wasn't storing a reference to the
> delegate
> > anywhere so perhaps it was being deleted in some cases. I added a
> variable
> > to store the reference to the delegate but unfortunately that didn't
> change
> > anything.
>
> I was just checking to see if you had missed that, but it was obvious from
> the description of the problem that you hadn't made that mistake.
>
> > I pared down the code to it's bare minimum and included it here.
> > Thanks for looking into the problem.
>
> You're not going to like this, but, when I use the
> setItemDelegateForColumn()
> method instead of setItemDelegate() for the whole model, the code works in
> the way you want, for me at least.
>
> However, it doesn't work when the delegate is used for the whole model, so
> it might also be interesting to find out why.
>
> I'm using SIP 4.5.2, PyQt 4.1.1 and Qt 4.2.2.
>
> David
>
> _______________________________________________
> PyQt mailing list PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20070608/017689a7/attachment.html
More information about the PyQt
mailing list