标签:
QTreeWidgetItem * pCurrentItem = this->itemAt(event->pos() );
event是单击、双击、右键响应函数的参数,如
void CDataTree::contextMenuEvent ( QContextMenuEvent * event )
{
QTreeWidgetItem * pCurrentItem = this->itemAt(event->pos() );
}
void CDataTree::mouseReleaseEvent(QMouseEvent * event)
{
QTreeWidgetItem * pCurrentItem = this->itemAt(event->pos() );
}
在单QTreeWidget如何准确的获得currentItem
标签:
原文地址:http://blog.csdn.net/hudfang/article/details/42107197