Qt: How to detect the right clicked item when using customContextMenuRequested signal
hello all quick question im using in Treewidget the customConte开发者_如何学JAVAxtMenuRequested signal and using using popup with qmenu How can I get the item pointer / object / reference that just bean right clicked before the popup executed
I need to make some validation on the itemThat signal contains a QPoint
, QWidget::customContextMenuRequested(const QPoint & pos)
, which you can pass to QTreeWidget::itemAt(const QPoint & p)
which returns a QTreeWidgetItem
.
精彩评论