[PyKDE] Stuck newbie

johannes_graumann at web.de johannes_graumann at web.de
Wed Oct 11 07:33:27 BST 2006


> > Can somebody tell me how to properly connect my 'actionQuit_Ctrl_Q' with a
> > quit signal for the whole Application execution loop?
> 
> You need to connect its triggered() signal to qApp's quit() slot. qApp is a
> global variable in the QtGui module. Or, since you are subclassing
> QApplication, you can just connect it to the instance's inherited quit()
> slot:
> 
> def _connectSlots(self):
>     self.connect(self.maindialog.actionQuit_Ctrl_Q,
>                  QtCore.SIGNAL("triggered()"),
>                  self.quit)
> 
> This assumes that actionQuit_Ctrl_Q is a QAction instance. If it's actually
> a button then you need to use the clicked() signal.

Thanks once again for your help. I failed to comprehend the difference between action and button ...

Joh

_____________________________________________________________________
Der WEB.DE SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen!
http://smartsurfer.web.de/?mc=100071&distributionid=000000000066




More information about the PyQt mailing list