QT: Scroll widget that renders directly to the DC
Posted
by shoosh
on Stack Overflow
See other posts from Stack Overflow
or by shoosh
Published on 2010-03-22T19:03:32Z
Indexed on
2010/03/23
16:43 UTC
Read the original article
Hit count: 391
I'm trying to create a widget which paints directly to the windows Device Context by calling getDC()
and painting an HBITMAP
to it.
The widget I'm painting resides inside a scroll widget.
I've implemented the paintEvent()
and it does seem to paint but immediatly after painting the widget gets painted over again with a blank gray color.
I've tried setting WA_PaintOnScreen
and Qt::WA_NoSystemBackground
but none of those help.
In theory this should be possible since this is basically how the GLWidget
works.
What am I missing?
© Stack Overflow or respective owner