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 <[EMAIL PROTECTED]> 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    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

_______________________________________________
PyQt mailing list    [email protected]
http://www.riverbankcomputing.com/mailman/listinfo/pyqt

Reply via email to