kubas
7th September 2009, 12:44
Hey,
i have this issue:
i added contexmenu to qtreewidget
tree.setContextMenuPolicy(ContextMenuPolicy.Custom ContextMenu);
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));
}
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
i have this issue:
i added contexmenu to qtreewidget
tree.setContextMenuPolicy(ContextMenuPolicy.Custom ContextMenu);
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));
}
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