Hello all,
I have implemented a Class that inhertis QTableWidget und implemented the mouseEvent methods:
Code:
but I just receive a mousePressEvent when I doppel click on a widget. It is very curious!!! Has anyone an idea???
best regards
Printable View
Hello all,
I have implemented a Class that inhertis QTableWidget und implemented the mouseEvent methods:
Code:
but I just receive a mousePressEvent when I doppel click on a widget. It is very curious!!! Has anyone an idea???
best regards
Please provide sample code other than above
try using.Code:
void setMouseTracking ( bool enable )
please check the spelling of mouseDoppelClickEvent();
it should be mouseDoubleClickEvent()
oh, yes, i misspelt double, thank you.
now the following:
at first double click, I still receive mosuePressEvent, after that I correctly receive mouseDoubleClickEvent.
and then I always receive the same mouseDoubleClickEvent, it doesn't matter where I double click on my QGraphicsView!!!
but I still don't receive mousePressEvent und mouseMoveEvent. I have to go mad!!!
setMouseTracking(true) doen't help. I want to receive a mouseEvent only on click, double click, and move (press mouse button, move, release mouse button) and not mouse over etc.
I hope somebody can help me
try this
Code:
graphicsView->viewport()->setMouseTracking(true);
graphicsView->viewport()->setMouseTracking(true); doesn't help too...
then, prepare compilable example which reproduces the problem and post it.
I have fixed the problem. The reason was that I implemented my own GrpahicsView and I had implemented the mouse events in my GraphicsView too.
It works perfect as soon as I remove the mouse events from MyGraphicsView.
Thanks for your answers.