Can't use parameter *event
-
Hi everyone. Here is a problem, for some reason(i'm 2 days trying to figure it out) i can't use parameter of reimplemented function(in other projects i remember i could).
Function:
void mousePressEvent(QMouseEvent *event);
My Custom class which simply create graphicsView and stuff in it:
class myGview : public QGraphicsView
And when i, in body of that function trying use event - nothing happens. I mean normaly, it would be possible to use arrow member selector after i typing out "event" but i press .dot, nothing happens, it do not transform in to -> as any pointer objects do.
It should work, and i need to use it like this:
event->button()
Would be thankful of any help!
-
Does it compile if you manually type the '->' and you call a valid member function? Did you include the QMouseEvent header?
#include <QMouseEvent>