Hey,
i have this issue:
i added contexmenu to qtreewidget
tree.setContextMenuPolicy(ContextMenuPolicy.CustomContextMenu);
tree.customContextMenuRequested.connect(this, "treeMenu(QPoint)");
....
private void treeMenu
(QPoint point
) {
... add some actions ...
menu.exec(ui.tree.mapToGlobal(point));
}
tree.setContextMenuPolicy(ContextMenuPolicy.CustomContextMenu);
tree.customContextMenuRequested.connect(this, "treeMenu(QPoint)");
....
private void treeMenu(QPoint point)
{
QMenu menu = new QMenu(tree);
... add some actions ...
menu.exec(ui.tree.mapToGlobal(point));
}
To copy to clipboard, switch view to plain text mode
it works just fine but ..
if i right click on it it fires up 3 times,
so multiple times is the signal emitted.
How to deal with it and filter the signals or block ?
Greets,
Kubas
Bookmarks