Can anyone suggest me in detail how to use QDirectPainter
class to paint a widget directly on frame buffer. I would be more helpful if you provide me a working example.
Asked
Active
Viewed 1,013 times
1 Answers
1
QDirectPainter does not and can not paint anything. It is there to provide access to the framebuffer, i.e. via its QDirectPainter::frameBuffer () function. Once you have the pointer the framebuffer, you should be able to manipulate the pixels directly.
An approach that might work is to paint your widget to a QImage (careful about the color depth, byte order, pixel placement, etc to match those of your framebuffer) via the raster engine. This is easily possible by opening a QPainter on a QImage. After the painting process is done, blit the relevant part of the image buffer to the framebuffer.

Ariya Hidayat
- 12,523
- 3
- 46
- 39