I have reimplemented mousePressEvent inside of a QGLWidget. It never gets called.
I have also reimplemented mouseMoveEvent in the same widget (as recounted in an earlier post). It gets called satisfactorily.
I dont think there is anything odd about my function:
{
if(FLOATING_DOT == mouseMode){
QPoint currentPos
= event
->pos
();
lastPos = currentPos;
}
}
void ImageGLView::mousePressEvent(QMouseEvent *event)
{
if(FLOATING_DOT == mouseMode){
QPoint currentPos = event->pos();
lastPos = currentPos;
}
}
To copy to clipboard, switch view to plain text mode
and here is the .h
protected:
void initializeGL();
void paintGL();
protected:
void initializeGL();
void paintGL();
void mouseMoveEvent(QMouseEvent *event);
void mousePressEvent(QMouseEvent *event);
To copy to clipboard, switch view to plain text mode
Is there something special I need to know about reimplementing mousePressEvents? I tried implementing it on the parent of my QGLWidget, and it indeed got called when I clicked in the non-covered up part of the parent--
I am setting stereo mode on the QGLWidget, but it doesn't seem to make any difference when I dont do so.
I'm baffled, and would greatly appreciate any help. My apologies if this seems like a repost, but my last query was asking for help with mouseMoveEvent, and after I solved my move problem and posed my press problem, I never got any responses
Bookmarks