开发者

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 item


That signal contains a QPoint, QWidget::customContextMenuRequested(const QPoint & pos), which you can pass to QTreeWidget::itemAt(const QPoint & p) which returns a QTreeWidgetItem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜