Hello!

Why this code is incorrect?
Why image doesn't painting in frame?

//////////////////////////////////////////////////////////////////
#include <QtGui>
#include <QApplication>
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
QFrame f;
QPainter p(&f);
QImage i("tst.jpg");
p.drawImage(0,0,i);
f.show();
return app.exec();
}
//////////////////////////////////////////////////////////////////

P.S.
mingw / QT-4.1.0