[PyQt] dictionary signal

Phil Thompson phil at riverbankcomputing.co.uk
Tue Nov 20 17:22:48 GMT 2007


On Tuesday 20 November 2007, Linos wrote:
> Hello,
> 	i want to emit a signal from a dialog that contains a dictionary (i would
> like to do with a qt class but QMap dont seems to be in PyQt, almost this
> "test = QMap()" doesnt works), i know i can pass a python dictionary in a
> short-circuit signal but i would like to send with a qvariant in the same
> signal, it is this possible? this is that i am using now, but i would like
> to add the dictionary:
>
> self.emit(SIGNAL("ticketcerrado(QVariant)"), codigo_vendedor)
>
> I know i can use other signal (short cirtuit) or send every the dictionary
> value but i think should exist any other better solution i have not found.

You can pass *any* Python object to a short-circuit signal, including a 
wrapped QVariant.

Phil


More information about the PyQt mailing list