QTreeWidget双击事件

QTreeWidget双击事件

#include <QtWidgets/QWidget>

 

 

public slots:
    void OnlineTreeViewDoubleClick(QTreeWidgetItem*,int);


private:
    QTreeWidget* treeWidget_set;

 

connect(treeWidget_set, SIGNAL(itemDoubleClicked(QTreeWidgetItem*, int)), this, SLOT(OnlineTreeViewDoubleClick(QTreeWidgetItem*, int)));

 

void OnlineTreeViewDoubleClick(QTreeWidgetItem* indexItem, int itemID)
{
    QString itemText = indexItem->text(itemID);
    qDebug() << "--" << itemText;
}

 

 

##########################

 

posted @ 2021-05-03 16:45  西北逍遥  阅读(2263)  评论(0编辑  收藏  举报