我要load一个图像,路径是固定的,我用了下面的方法
QString newfilename = "/test.pgm";
.........
loadImage( newfilename ) ;
loadImage( const char *fileName )
{
...........
filename = fileName;
ok = image.load(filename, 0);
............
,,,,,,,,,,,,
}
这是状态栏提示信息部分:
if ( pm.size() == QSize( 0, 0 ) ) {
if ( filename )
status->setText("Could not load image");
else
status->setText("No image - select Open from File menu.");
}
我现在每次load图像就是显示Could not load image,我是把那个图像放在了/下面,名字也是对的,图像格式是.pgm的,而且我编译pc版本是可以用的,现在不知道问题出在哪里,请高手指教一下,谢谢!
[ 此贴被XChinux在2006-08-26 09:39重新编辑 ]