[PyKDE] Newbie pyQt user needs some slot help

Matthew Flower mattflower at yahoo.com
Thu May 4 16:48:34 BST 2000


You asked about the first problem people find when using PyQt or PyKDE.  I can't speak for
everyone, but this was the first thing I ran into.  Still, it was remarkably minor (the hair I
pulled out will grow back).  I just happened to be programming something unusual.  

Beyond searching through the posts in this newsgroup, do you think there would be a way to prevent
folks from making the same mistake in the future?  The error message was clear once I understood
that neither exec() or exec_loop() was a slot, but beforehand I was having trouble with that
concept.  

-Matt

--- Phil Thompson <phil at river-bank.demon.co.uk> wrote:
> Boudewijn Rempt wrote:
> > 
> > On Thu, 27 Apr 2000, Phil Thompson wrote:
> > 
> > > QPopupMenu::exec() isn't a slot, it's just a member function.  You could
> > > sub-class a QPopupMenu with a Python method called (say) showMenu which
> > > does something like...
> > >
> > 
> > When I was concocting some sample code for Matthew to play with I started
> > thinking about this issue, and I was wondering whether it would would be
> > difficult, desirable or useful to adapt PyQt to make all public C++
> > members slots - after all, all Python member functions can be slots, too.
> 
> Difficult - no, but SIP would have to generate a fair bit of extra code
> (an extra C++ member function for every function that wasn't already a
> slot).
> 
> Desirable - no (from my point of view) as it starts to make PyQt
> different (possibly better) that C++ Qt.
> 
> Useful - I'm not the person to judge, but this is the first time anybody
> has (publically) had this problem.
> 
> I'd be interested to know, when people first started using PyQt/PyKDE,
> what their biggest problem was.
> 
> Phil
> 

__________________________________________________
Do You Yahoo!?
Send instant messages & get email alerts with Yahoo! Messenger.
http://im.yahoo.com/




More information about the PyQt mailing list