Yes, I just tested with:
int main(int argc, char *argv[])
{
scn->setSceneRect( w->rect() );
w->setScene( scn );
w->setFixedSize( 400, 400 );
scn->addPixmap( pix );
w->show();
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
return a.exec();
}
int main(int argc, char *argv[])
{
QApplication a(argc, argv);
QGraphicsView* w = new QGraphicsView();
QGraphicsScene *scn = new QGraphicsScene( w );
scn->setSceneRect( w->rect() );
w->setScene( scn );
w->setFixedSize( 400, 400 );
QPixmap pix( "c:\\pix_jpg.jpg" );
scn->addPixmap( pix );
w->show();
a.connect( &a, SIGNAL(lastWindowClosed()), &a, SLOT(quit()));
return a.exec();
}
To copy to clipboard, switch view to plain text mode
( yes, this is a very poor example ).
I loaded both your jpeg and some others, and also a png. All were OK.
Maybe you have some problems with your jpeg plug-in. Try loading a png instead.
Anyway, you should look at what pixmap.size() return after you load it.
Regards
Bookmarks