[PyKDE] Emitting a signal from Python

David Boddie david at boddie.org.uk
Mon Feb 12 20:59:33 GMT 2007


On Monday 12 February 2007 07:21, Tony Cappellini wrote:

> Perhaps I'm going about this wrong. I want to simulate the user
> selecting the first item (Or any item) in a combo box.

I think you may want to call setCurrentIndex() on the combo box.

> I don't need to pass it a text string, the strings are already in the
> combo box. I just need to select it, so the signal I've connected to
> the combo box activate signal gets fires off to the slot.

And, instead of connecting the activated(int) signal to a slot elsewhere,
connect the currentIndexChanged(int) signal to it.

David




More information about the PyQt mailing list