[PyKDE] sip wrapping QCanvasItem's rtti()

Anthony Heading aheading at jpmorgan.com
Wed Jan 15 01:57:01 GMT 2003


On Tue, Jan 14, 2003 at 11:58:53PM +0000, Phil Thompson wrote:
> > The current form is forcibly selecting the base class implementation
> > of the function.
> 
> Yes, so that...
> 
> class MyItem(QCanvasItem):
> 	def rtti(self):
> 		QCanvasItem.rtti(self)
> 
> ...doesn't result recurse ad infinitum.

Hmm. Very fair. I hadn't considered that. 

Okay, so a general rule is that virtual functions
may not be reimplemented by subclassing in C++,
since the Python class space "owns" the hierarchy.

Thanks for the help.

Anthony

This communication is for informational purposes only.  It is not intended as
an offer or solicitation for the purchase or sale of any financial instrument
or as an official confirmation of any transaction. All market prices, data
and other information are not warranted as to completeness or accuracy and
are subject to change without notice. Any comments or statements made herein
do not necessarily reflect those of J.P. Morgan Chase & Co., its
subsidiaries and affiliates.




More information about the PyQt mailing list