Qt-interest Archive, December 2006
How to retrieve the QTreeWidgetItem out of a QModelIndex?
Message 1 in thread
I have a QTreeWidget with QTreeWidgetItems and connceted the clicked() event
to some method. Now I get a QModelIndex in the event and want to extract
the correct QTreeWidgetItem. How do I do that?
Arne
--
[ signature omitted ]
Message 2 in thread
Arne Schmitz wrote:
> I have a QTreeWidget with QTreeWidgetItems and connceted the clicked() event
> to some method. Now I get a QModelIndex in the event and want to extract
> the correct QTreeWidgetItem. How do I do that?
>
> Arne
>
QTreeWidget is designed to hide the Model-View aspects. There is a
better signal on QTreeWidget...
void itemClicked <qtreewidget.html#itemClicked> ( QTreeWidgetItem *
item, int column )
--Justin
begin:vcard
begin:vcard
fn:Justin Noel
n:Noel;Justin
org:ICS;Engineering
adr:;;54B Middlesex Trpk;Bedford;MA;01730;USA
email;internet:justin@xxxxxxx
title:Sr. Consulting Engineer / Certified Qt Instructor
tel;work:(617) 621-0060
url:http://www.ics.com
version:2.1
end:vcard
Message 3 in thread
Justin Noel wrote:
> Arne Schmitz wrote:
>> I have a QTreeWidget with QTreeWidgetItems and connceted the clicked()
>> event to some method. Now I get a QModelIndex in the event and want to
>> extract the correct QTreeWidgetItem. How do I do that?
>>
>> Arne
>>
>
> QTreeWidget is designed to hide the Model-View aspects. There is a
> better signal on QTreeWidget...
>
>
> void itemClicked <qtreewidget.html#itemClicked> ( QTreeWidgetItem *
> item, int column )
Thank you, I went by the standard procedure, looking for the clicked()
signal...
Arne
--
[ signature omitted ]