[Qt-interest] How to Map Back a QGraphicsItem by position ?

Aaron Lewis aaron.lewis1989 at gmail.com
Mon May 10 06:06:46 CEST 2010


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,
	I have a QGraphicsScene , inside it there's lots of QGraphicsItem.

	I tried to create a custom class which inherit QGraphicsItem , and i
re-implemented the type() function.
	By that way i'll be able to detect my Item type.

	But the problem is , how can i map it back to a QGraphicsItem from a
specified position ?

	e.g I know at QPointF(200,300) , there's a item , i will use
QPointF(200,300) to map my QGraphicsItem back and check type() function
to know what kind of Item it is.

	Appreciate any of your help ;-)

	Thanks in advance !


- -- 
Best Regards,
Aaron Lewis - PGP: 0x4A6D32A0
FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
irc: A4r0n on freenode
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAkvnhlYACgkQvf41sEptMqBANwCfbN0cNKw8+xohx1EALR6LQPBO
I0UAoMXhAsmq0siXOkbvq+Z5GloWMZjk
=DtQk
-----END PGP SIGNATURE-----



More information about the Qt-interest-old mailing list