PDA

View Full Version : problem in QLabel



iswaryasenthilkumar
6th April 2015, 06:48
am using single label to display images and text for every 10 seconds,am having folder which contains set of images,,as per timer concept images are started to display every 10 seconds as per sortedlist,if one of images missed i have to give text message on that same label i have setted geomentry size for text,my problem is after given text message,my timer started to read next images to display,,but my image size are per geomentry size how can i rectify this problem:( can any one give me suggestion for this:confused:
Thanks in advance:)
my code below:
for display images:


displayimages()
{
label->setPixmap(QPixmap::fromImage(ImageToLoad.scaled( 1025,1025,Qt::KeepAspectRatio)));
label->show();
}
for text message


missing image()
{

ImageToLoad.fill(qRgba(255,255,255,255));
label->setPixmap(QPixmap::fromImage(ImageToLoad.scaled(10 25,1025,Qt::KeepAspectRatio)));
label->setText("Remote Config File has Errors");
label->adjustSize();
QFont f( "Bitstream Charter", 14, QFont::Bold);
label->setFont(f);
label->setGeometry(300,300,500,20);
label->show();
}