PDA

View Full Version : Using of contextMenuRequested signal of one widget broke same signal of another



Akdez
26th November 2015, 11:16
Hi All,

I have a custom dialog (inherits QDialog) and two widgets on it: QTreeWidget and custom 3D viewer (QVTKWidget from VTK 6.1.0). I've connected each widget with contextMenuRequested signal on two slots of my dialog:



treeWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(treeWidget, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customTreeMenuRequested(QPoint)));

viewWidget->setContextMenuPolicy(Qt::CustomContextMenu);
connect(viewWidget, SIGNAL(customContextMenuRequested(QPoint)), SLOT(customViewMenuRequested(QPoint)));


My problem is that when i request context menu on 3D viewer by right mouse click, signal from QTreeWidget is never emitted after. I've set breakpoint on customTreeMenuRequested(), but it's never hit after request of context menu on viewer.
Can anyone explain me please, if i miss something and doing wrong?

Added after 50 minutes:

Sorry, problem was on my side. So nothing to resolve here.