Hi,
I would like to display a QLabel (basically just a text) on top of an QGlWidget.
In paintGL() I render my OpenGL stuff, I would like to have a number displayed over the OpenGL context.
I tried overriding paintEvent but I think the Gl context is always on top.
Any idea?
Thanks in advance
{
painter.
setRenderHint(QPainter::Antialiasing);
painter.drawText(250, 250, "1");
}
void Player::paintEvent(QPaintEvent *event)
{
QPainter painter(this);
painter.setRenderHint(QPainter::Antialiasing);
painter.drawText(250, 250, "1");
QGLWidget::paintEvent(event);
}
To copy to clipboard, switch view to plain text mode
Bookmarks