On Saturday 19 January 2008, Adeodato Simó wrote: > Hello. > > I've subclassed in Python from a C++ class that has: > > public slots: > > virtual void updateSearch (const QString &pattern=QString()); > > protected: > > virtual void updateSearch (QTreeWidget *treeWidget); > > I want to provide my own updateSearch(), but only for the slot case. Is > this possible at all? At the moment, my python function is gettin called > in both cases. > > Any help appreciated.
You need to handle both cases. Check the type of the argument to determine which one is called. For the one you aren't interested in, just call the base implementation... def updateSearch(self, arg): if not isinstance(arg, QString): superclass.updateSearch(self, arg): else: do_your_thing() Phil _______________________________________________ PyQt mailing list [email protected] http://www.riverbankcomputing.com/mailman/listinfo/pyqt
