I have a paint program I've written in java and have been wanting to port it to C++. It works pretty well with java, but in dealing with very large images ( 6000 x 4800) there can be some stuttering do to java being a garbage collection language. I want to move it to C++ so I'll have more control over the destruction of objects. System.gc() works fairly well in java, but in the end its only a suggestion for the system to clean up orphaned objects.
What attracted me to Qt was the tablet support. In java there is jpen, but I couldn't find the equivalent in a C++ library and in searching for one, I found Qt.

In my program, the image is represented in 3 ways. There is the main image. This is the image that would be saved if the work is saved. Its the image that is first loaded, or first created if a new painting is created.
There is also a floating point array that is a floating point representation of the image. It is initialized with the main image and all painting and pixel mixing occur in this array. It prevents any type of integer clipping which can cause errant hue shifts. These values remain floating point, and when a paint operation is finished, an integer representation of whats currently in the float array is pasted into the main image, but the float array remains exactly as it was after the paint operation.

The last is the display image. This is what is displayed on screen depending on whether the view is zoomed or dragged and is taken from the main image.

From what I've read so far, the two classes I would probably be using is QImage for the main image and QPixmap for the display. The floating point image would of course remain a floating point array.
What worries me is the methods I've seen to get a pixel and write a pixel in the QImage class. Getting or putting a pixel with (x,y) is doing math for every pixel. What I need is a pointer to the pixel data and its format.
My next concern is the conversion from QImage to QPixmap. How expensive is that conversion? Is it simply retyping or is there some sort of copying involved?