#include <QtGui>
int main (int argc, char **argv)
{
QLabel *lab
=new QLabel(0,Qt
::FramelessWindowHint | Qt
::WindowStaysOnTopHint);
QPixmap p1
(p
->scaled
( lab
->width
(),lab
->height
(), Qt
::IgnoreAspectRatio, Qt
::SmoothTransformation ));
lab->setPixmap(p1);
lab->show();
lab->adjustSize();
return app.exec();
}
#include <QtGui>
int main (int argc, char **argv)
{
QApplication app(argc,argv);
QLabel *lab=new QLabel(0,Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
QPixmap *p=new QPixmap("plane.jpg");
QPixmap p1(p->scaled ( lab->width(),lab->height(), Qt::IgnoreAspectRatio, Qt::SmoothTransformation ));
lab->setPixmap(p1);
lab->show();
lab->adjustSize();
return app.exec();
}
To copy to clipboard, switch view to plain text mode
I hope it helps also.
Bookmarks