Hi, if you use a pointer, you need to use image->setPixel().
But your original code should not create a memory leak because the QImage is created on the stack and gets destroyed once the method myClass:aint() is left.
Ginsengelf
Hi, if you use a pointer, you need to use image->setPixel().
But your original code should not create a memory leak because the QImage is created on the stack and gets destroyed once the method myClass:aint() is left.
Ginsengelf
I'll make a pretty good bet that it is the "do stuff here" code that causes the memory leaks unless
Qt Code:
To copy to clipboard, switch view to plain text mode
this code also ended up inside the paint() method.
Bookmarks