I have been trying to display a gray-scale image using Qt. The image data is loaded from a .txt file that contains 256x256 float data. There is no header involved for the image. I have tried the solution posted in this link
I used QLabel
class to call setPixmap
of my uchar* image_data_array
. Even though I could get a Qt GUI window to open, but the window shows just blank screen.
imageLabel -> setPixmap(QPixmap::fromImage(*myImage));
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…