[Qt-interest] signal itemClicked and signal itemChanged of QTreeWidgetItem

yanqzhi at gmail.com yanqzhi at gmail.com
Tue Mar 2 10:47:34 CET 2010


CProductTreeWidget::CProductTreeWidget(QWidget *parent)
: QTreeWidget(parent)
{
 ui.setupUi(this);
 mSelectedItem = NULL;
 connect( this, SIGNAL( itemClicked( QTreeWidgetItem*, int ) ),
  this, SLOT( itemSelect( QTreeWidgetItem*, int ) ) );
 connect( this, SIGNAL( itemChanged( QTreeWidgetItem*, int ) ),
  this, SLOT( updateCheckState( QTreeWidgetItem*, int ) ) );
}

When I click the checkbox of a QTreeWidgetItem of the CProductTreeWidget, I found that the slot updateCheckState
will be excuted firstly and the slot itemSelect will be excuted secondly. But I want that the slot ItemSelect 
be excuted firstly. 

How can I do?

Thanks a lot!

Sincerely yours, 
Yan

yanqzhi at gmail.com 
2010-03-02 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100302/a9bdad9f/attachment.html 


More information about the Qt-interest-old mailing list