[PyQt] comboBox inside a statusBar

Ingmar Steen iksteen at gmail.com
Wed Nov 7 11:08:29 GMT 2007


On Nov 7, 2007 10:57 AM, kib2 <kib2 at free.fr> wrote:
> Hi,
>
> I've just tried to add a comboBox inside my statusBar of my Main
> application like this :
>
>     def manageStatusBar(self):
>             self.combo = QtGui.QComboBox(self)
>             self.langList = QtCore.QStringList(["a","b","c","d","e"])
>             self.combo.addItems(self.langList)
>             self.statusBar().addPermanentWidget(self.combo)
>             self.statusBar().showMessage(self.tr("Ready..."))
>             self.connect(self.combo,
> QtCore.SIGNAL("editTextChanged(QString)"),self.langChanged)
>
>     def langChanged(self, someText):
>         print str(someText)
>
> But I receive the following message :
> QObject::connect: Connecting from COMPAT signal
> (QComboBox::textChanged(QString))
>
> What's wrong here ?
> Thanks.
>
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>

Hi,

You get that message because QComboBox::textChanged is a Qt3
compatibility signal. In Qt4 you should use the editTextChanged
signal, the activated signal or the currentIndex signal.

Ingmar


More information about the PyQt mailing list