[PyKDE] Newbie pyQt user needs some slot help

Boudewijn Rempt bsarempt at rempt.xs4all.nl
Sun Apr 30 23:46:40 BST 2000


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.

> 	def showMenu(self):
> 		self.exec_loop()
> 
> ...and connect to it...
> 
> QObject.connect(but, SIGNAL("clicked()"), pm.showMenu)
> 
> Phil
> 





More information about the PyQt mailing list