Unsolved QGraphicsScene not output image after add QPixmap
-
Hello!
I use qt-5.5.1 x64 on linux.
For output images I use qrpaphicsscene, follow simple code_scene->addPixmap(QPixmap::fromImage(image));
Usually I work with images in QImage::Format_RGB888, but now I have images in QImage::Format_ARGB32 and I see only black screen.
Ok, may be qgraphicsscene can't work with QImage::Format_ARGB32?
I convert image to QImage::Format_RGB888QImage rgb = image.convertToFormat(QImage::Format_RGB888); _scene->addPixmap(QPixmap::fromImage(rgb));
Unfortunately this not solve problem.
How can I solve this problem?
Thank you and excuse my bad english. -
Hi,
Might be a silly question but are you sure that the new image is valid and not null ?