[Interest] How can i manipulate pixel data from a QWidget?

Mark markg85 at gmail.com
Sat Sep 22 21:00:11 CEST 2012


I know one can manipulate pixel data in a QImage using the bits()
function, but how can i do the same for a QWidget?
I want to play with a high performance line drawing algorithm [1] so i
guess it's not very optimal to do the following:
- draw in a QImage
- put that image in the qwidget
- further drawing in the QImage
- put it on the QWidget again
- ... and so on ...

In this case i'm guessing that the QImage mapping to a QWidget would
be the most costly one hence i'd like to prevent that altogether and
"just" manipulate the QWidget pixel data directly.
So how do i do that?


[1] http://free.pages.at/easyfilter/bresenham.html

More information about the Interest mailing list