[PyQt] headerDataChanged

Mads Ipsen mpi at comxnet.dk
Thu Aug 20 09:07:29 BST 2009


Phil Thompson wrote:
> On Thu, 20 Aug 2009 09:53:48 +0200, Mads Ipsen <mpi at comxnet.dk> wrote:
>   
>> Hi,
>>
>> How do I emit the signal headerDataChanged in PyQt when implementing  
>> the method
>> setHeaderData() for a QAbstractTableModel?
>>
>> The C++ syntax is
>>
>>   emit headerDataChanged(orientation, section, section);
>>
>> and the C++ definition of the signal reads
>>
>>   void QAbstractItemModel::headerDataChanged ( Qt::Orientation 
>> orientation, int first, int last )
>>
>> but I don't know how to convert that to Python syntax.
>>     
>
> Old API...
>
> model.emit(SIGNAL('headerDataChanged(Qt::Orientation, int, int)'),
> orientation, section, section)
>
> New API...
>
> model.headerDataChanged.emit(orientation, section, section)
>
> Phil
>
>   
Thanks for pronto response.

Mads

-- 
+------------------------------------------------------------+
| Mads Ipsen, Ph.D, Scientific software developer            |
+------------------------------+-----------------------------+
| QuantumWise A/S              | phone:         +45-29716388 |
| Nørresøgade 27A              | www:    www.quantumwise.com |
| DK-1370 Copenhagen, Denmark  | email:  mpi at quantumwise.com |
+------------------------------+-----------------------------+




More information about the PyQt mailing list