[PyKDE] Missing signal?

Eron Lloyd eronlloyd at gmail.com
Tue Apr 5 02:21:29 BST 2005


Ah ha, guess I need more rest... thanks a lot.

Eron

On Monday 04 April 2005 6:34 pm, Torsten Marek wrote:
> Eron Lloyd schrieb:
> > Hi all,
> >
> > I'm trying to connect to the overloaded method of
> > QComboBox.activated(const QString & string), but Qt complains that
> > there's no such signal. Here is some sample code:
> >
> > from qt import *
> >
> > app = QApplication([])
> > vBox = QVBox()
> > label = QLabel("Current Item", vBox)
> > comboBox = QComboBox(vBox)
> > comboBox.insertItem("One")
> > comboBox.insertItem("Two")
> > comboBox.insertItem("Three")
> > app.setMainWidget(vBox)
> > app.connect(comboBox, SIGNAL("activated(const QString & string)"), label,
> >     SLOT("setText(const QString &)"))
> > app.connect(app, SIGNAL("lastWindowClosed()"), app, SLOT("quit()"))
> > vBox.show()
> > app.exec_loop()
>
> Signals don't have names for the arguments, just types.
> It must be
> app.connect(comboBox, SIGNAL("activated(const QString&)"), label,
>      SLOT("setText(const QString &)"))




More information about the PyQt mailing list