[PyQt] Documentation -- bug

Heinz A Preisig heinz.preisig at chemeng.ntnu.no
Mon Jul 20 08:43:38 BST 2009


When playing with the new-style signal/slot  notation, I stumbled over a
mistake in the documentation, if I am not completely wrong.

In the description of the comboBox it reads

There are two signals emitted if the current item of a combobox changes,
currentIndexChanged
<http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcombobox.html#currentIndexChanged>()

and activated
<http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcombobox.html#activated>().

currentIndexChanged
<http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcombobox.html#currentIndexChanged>()

is always emitted regardless if the change was done programmatically or
by user interaction, while activated
<http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcombobox.html#activated>()

is only emitted when the change is caused by user interaction. The
highlighted
<http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcombobox.html#highlighted>()

signal is emitted when the user highlights an item in the combobox popup
list. All three signals exist in two versions, one with a QString
<http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qstring.html>
argument and one with an int argument. If the user selectes or
highlights a pixmap, only the int signals are emitted. Whenever the text
of an editable combobox is changed the editTextChanged
<http://www.riverbankcomputing.co.uk/static/Docs/PyQt4/html/qcombobox.html#editTextChanged>()

signal is emitted.

Seems to me that it is activated() that is emitted regardless... and it
is currentIndexChanged() when the change is caused by user interaction.

Cheers,

Heinz Preisig



More information about the PyQt mailing list