Experiencing a temporary change in the background page color when the dialog is displayed
-
Hello everyone,
I am developing an UI dispay (Qt 4.8.6 using c++).I am experiencing a temporary change in the background page color when the dialog is displayed,the issue started when i replaced the stylesheet with a QPixmap for images to display in the background page. when the dialog is displayed on top of pages that uses stylesheets,this issue is not observed. Can anyone please help to fix it?QString strFolderPath,strFinalPath;
if (iPageId == PAGE_CHARGEPREPARE_A) { strFolderPath = ":/images/Icon Pack/prep_circles_green/"; } else if (iPageId == PAGE_CHARGEPREPARE_B) { strFolderPath = ":/images/Icon Pack/prep_circles_blue/"; } strFinalPath = strFolderPath + QString::number(animationCounter + 2) + ".png"; QPixmap originalPixmap(strFinalPath); QSize labelSize = ui->label_circle->size(); QPixmap scaledPixmap = originalPixmap.scaled(labelSize, Qt::KeepAspectRatio, Qt::FastTransformation); ui->label_circle->setPixmap(scaledPixmap);
-
Hi,
4.8.6 ? That's more than outdated...
Which size are your original images ?
Which size is the target ?
Do you really need to recreate the image every time you switch widgets ? -
Hi Sir,
my image dimensions: 570x570
target size: ui->label_circle->setGeometry(QRect(220, 140, 520, 520));
following images are kept in path:/images/Icon Pack/prep_circles_blue/