[PyQt] dictionary signal

Linos info at linos.es
Tue Nov 20 17:53:22 GMT 2007


Phil Thompson escribió:
> 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
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt


Yes this works very good, thanks Phil.

Best Regards,
Miguel Angel.


More information about the PyQt mailing list