Hi ALl,
I've an application to show image of your desktop.
I've a methode loadimage(), where i'm creating a label, adding image of yor dektop to lable. In side constructor i'm calling timer , and for each second, the image is updating. Problem is that the updated image is not displaying properly. i did like following
constructor()
{
Label->setGeometry(this->geometry());
Label->show();
loadimage();
connect(timer, SIGNAL(timeout()), this, SLOT(updateImage()));
timer->start(1000);
}
loadimage()
{
Label
->setPixmap
(QPixmap::fromImage(*testImage
));
//testimage is QImage and initialized}
updateImnage()
{
//testImage is upading here.
Label
->setPixmap
(QPixmap::fromImage(*testImage
));
Label->show();
}
constructor()
{
Label = new QLabel;
Label->setGeometry(this->geometry());
Label->show();
loadimage();
QTimer *timer = new QTimer(this);
connect(timer, SIGNAL(timeout()), this, SLOT(updateImage()));
timer->start(1000);
}
loadimage()
{
Label->setPixmap(QPixmap::fromImage(*testImage));//testimage is QImage and initialized
}
updateImnage()
{
//testImage is upading here.
Label->setPixmap(QPixmap::fromImage(*testImage));
Label->show();
}
To copy to clipboard, switch view to plain text mode
Can any body tell me how to solve this problem?
Bookmarks