Hello guys I am trying to modify the Image Viewer example of qt so that it gets an image with its constructor. This is wrong... how can I correct this:
Code:
..... ..... }
The new ImageViewer terminates upon imageviewer show
Printable View
Hello guys I am trying to modify the Image Viewer example of qt so that it gets an image with its constructor. This is wrong... how can I correct this:
Code:
..... ..... }
The new ImageViewer terminates upon imageviewer show
Why do you need to pass a QImage pointer pointer?
QPixmap::fromImage takes a const Image&.
So the statement:
is correct as long as image is a valid pointer.
It probably crashes because the image pointer is null or not valid.
I say the best way is to pass a const QImage& also, since QImage is implicitly shared.