我遇到个问题,有一张ppm格式的图像,怎么在qt 上显示呢?谢谢。
在qtopia中,用designer,可以静态读取一个ppm格式的图像。
可是用动态的方法就不行。该怎么办?
image = new QPixmap("./test.jpg");
imagePixmap->setPixmap(*image);
这样是可以的,可是换成test.ppm就提示:
Warning: QPixmap::convertToImage: Cannot convert a null pixmap
Warning:QImage::smoothScale:Image is a null image