[Interest] QGraphicsObject::boundingRect() called with different instance

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Wed Oct 30 12:17:54 CET 2019

On 30/10/2019 01:47, Bob Hood wrote:
> When I enter the constructor, I have a specific ‘this’ pointer that has 
> the provided ‘size’ argument placed into its ‘entity_size’ member. 
> However, when Qt subsequently invokes the boundingRect() override 
> function, it’s an entirely different ‘this’ instance whose ‘entity_size’ 
> has clearly not been initialized.
> I’ve looked at several select examples/widgets/graphicsview/ sources, 
> and those show that this should be working as expected.
> I’ve tested this with 5.11.1 and 5.12.3 with the same result, so I’m 
> guessing this is some kind of pilot error on my part.

Did you already run this code into valgrind / ASAN?

Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: S/MIME Cryptographic Signature
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191030/ba836fca/attachment.bin>

More information about the Interest mailing list