qpoint专题

Qt设置右键菜单无效customContextMenuRequested(const QPoint pos)

问题代码: void MainWindow::onCustomContextMenuRequested(const QPoint &pos){QTreeWidgetItem *item = ui->treeWidget->itemAt(pos);if (item){QMenu menu(ui->treeWidget);TreeNodeType nodeType = (TreeNodeType)