Trolltech Home | Qt-interest Home | Recent Threads | All Threads | Author | Date
All threads index page 3

Qt-interest Archive, January 2007
How to set QTreeWidgetItem activate inside QTreeWidget ?


Message 1 in thread

Hi Everyone,
I found QTreeWidget has signal :

void QTreeWidget::itemActivated ( QTreeWidgetItem * item, int column )
[signal]

I can recieve this signal when a QTreeWidgetItem has been
double clicked with mouse.

But I found no corresponding member function in QTreeWidget to
set a known QTreeWidgetItem to be activated.

Would anybody help me out ??

Regards,
Pagan



--
 [ signature omitted ] 

Message 2 in thread

Pagan Chou schrieb:
> Hi Everyone,
> I found QTreeWidget has signal :
> 
> void QTreeWidget::itemActivated ( QTreeWidgetItem * item, int column )
> [signal]
> 
> I can recieve this signal when a QTreeWidgetItem has been
> double clicked with mouse.
> 
> But I found no corresponding member function in QTreeWidget to
> set a known QTreeWidgetItem to be activated.
> 
> Would anybody help me out ??
> 
> Regards,
> Pagan
> 
> 

Hi Pagan,

did you try QTreeWidgetItem::setFlags( );
See documentation for details.
Hope this helps.

Regards,
Michael

--
 [ signature omitted ] 

Message 3 in thread

Michael,
Thanks for your answering. But it is not what I want.

QTreeWidgetItem::setFlags() can set this tree widget item as :

      Constant Value Description
      Qt::ItemIsSelectable 1 It can be selected.
      Qt::ItemIsEditable 2 It can be edited.
      Qt::ItemIsDragEnabled 4 It can be dragged.
      Qt::ItemIsDropEnabled 8 It can be used as a drop target.
      Qt::ItemIsUserCheckable 16 It can be checked or unchecked by the user.
      Qt::ItemIsEnabled 32 The user can interact with the item.
      Qt::ItemIsTristate 64 The item is checkable with three separate
states.

It is the UI possible action on this tree widget item. But I want to set is
this tree widget item current state

to activated.

Is there other way ?

Regards, Pagan


"Michael Sprauer" <Michael.Sprauer@xxxxxxxxxxxxxxxxxx> ???
news:45AF3F73.4020502@xxxxxxxxxxxxxxxxxx ???...
> Pagan Chou schrieb:
> > Hi Everyone,
> > I found QTreeWidget has signal :
> >
> > void QTreeWidget::itemActivated ( QTreeWidgetItem * item, int column )
> > [signal]
> >
> > I can recieve this signal when a QTreeWidgetItem has been
> > double clicked with mouse.
> >
> > But I found no corresponding member function in QTreeWidget to
> > set a known QTreeWidgetItem to be activated.
> >
> > Would anybody help me out ??
> >
> > Regards,
> > Pagan
> >
> >
>
> Hi Pagan,
>
> did you try QTreeWidgetItem::setFlags( );
> See documentation for details.
> Hope this helps.
>
> Regards,
> Michael
>
> --
> To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
> List archive and information: http://lists.trolltech.com/qt-interest/


--
 [ signature omitted ]