Since I have found afterwards that hard to read, I will simplify :

Simply derived a QGraphicsView with some items in it.
Add a member QLabel, never mind if empty, as child widget
Overload the QGraphicsView::mouseMoveEvent to attach the child widget to the mouse position, with an offset of -size/2.
Then, set a QGLWidget viewport of your QGraphicsView, with
Qt Code:
  1. setViewport(new QGLWidget(QGLFormat(QGL::SampleBuffers)));
To copy to clipboard, switch view to plain text mode 

When moving mouse, sometimes you can see the widget drawn on the upper left corner of the QGraphicsView, like a flickering or if it was drawn there before moving as kind of double buffering.

But if you trace the mouse positions, you will see that the coordinates have changed to this weird position, so the drawing is good.
This stuff does happen only with OpenGl activated.

S.Cascio