[prev in list] [next in list] [prev in thread] [next in thread]
List: pykde
Subject: Re: [PyQt] QTextBlockUserData unexpected behavior
From: Phil Thompson <phil () riverbankcomputing ! com>
Date: 2013-07-23 14:37:18
Message-ID: ca133408f1afdf5f80362bd1dd89323a () localhost
[Download RAW message or body]
On Tue, 23 Jul 2013 07:28:06 -0400, Grant Roch <grant.roch@gmail.com>
wrote:
> I'm trying to use QTextBlockUserData to hold info about blocks, but am
> seeing some strange behavior. I know there was a related issue posted
in
> March (
> http://www.riverbankcomputing.com/pipermail/pyqt/2013-March/032457.html)
> but I'm not sure if what I'm seeing is related. Here are two cases:
> 1. Run the below script as is will hold onto the userData only for a
short
> period. After setFirstBlock is called and it goes back into main, the
> block no longer has userData with value.
> 2. Comment out "line set A" and uncomment "line set B". Now userData
holds
> onto the value even after the button is pressed. This is the same code
so
> something else is going on.
Fixed in tonight's PyQt4 snapshot. The workaround is the keep a reference
to self.document().
> Also, are we expected to be able to subclass QTextBlockUserData in order
to
> add custom methods (suggested in the documentation)? I am not seeing
this
> work either as they always come back as QTextClockUserData rather than
my
> subclass.
Works for me (at least with the above fix).
> My versions are:
> ('Qt version:', '4.8.2')
> ('SIP version:', '4.15-snapshot-972540270afa')
> ('PyQt version:', '4.10.3-snapshot-05a01eef7a2e')
Thanks,
Phil
_______________________________________________
PyQt mailing list PyQt@riverbankcomputing.com
http://www.riverbankcomputing.com/mailman/listinfo/pyqt
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic