Thierry
15th February 2010, 21:42
Hi,
I have a strange issue between a QPushButton and my QToolBar. Basically, I override QPushButton to support right click events. When a user right click on the button, I overide mouseReleaseEvent and it emits a new custom signal. Another class deriving from QWidget connect this signal to a local slot. If this slot call a exec() method from a dialog, the dialog appear ok, but when the dialog close, a QMenu appear. This QMenu is the one generated by QToolBar when right clicking on the toolbar. As far as I'm concerned, the button and the toolbar are unrelated and the mouse was no where near the toolbar on the right click event.
So I can only assume that the right click event somehow propaged itself to the toolbar. If I change the exec() for a show() (and declare the dialog static), I don't see this problem.
I'm not sure if this description is clear enough... I will wait before posting a bunch of code.
Somebody has an idea?
Thanks!
I have a strange issue between a QPushButton and my QToolBar. Basically, I override QPushButton to support right click events. When a user right click on the button, I overide mouseReleaseEvent and it emits a new custom signal. Another class deriving from QWidget connect this signal to a local slot. If this slot call a exec() method from a dialog, the dialog appear ok, but when the dialog close, a QMenu appear. This QMenu is the one generated by QToolBar when right clicking on the toolbar. As far as I'm concerned, the button and the toolbar are unrelated and the mouse was no where near the toolbar on the right click event.
So I can only assume that the right click event somehow propaged itself to the toolbar. If I change the exec() for a show() (and declare the dialog static), I don't see this problem.
I'm not sure if this description is clear enough... I will wait before posting a bunch of code.
Somebody has an idea?
Thanks!