Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Experiencing a temporary change in the background page color when the dialog is displayed
Forum Updated to NodeBB v4.3 + New Features

Experiencing a temporary change in the background page color when the dialog is displayed

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
3 Posts 2 Posters 292 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • G Offline
    G Offline
    Guru Prasad Reddy
    wrote on last edited by
    #1

    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);
    
    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      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 ?

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • G Offline
        G Offline
        Guru Prasad Reddy
        wrote on last edited by
        #3

        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/

        1.png 2.png 3.png 4.png 5.png 6.png 7.png 8.png

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved