Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-135483

[REG 6.7-> 6.8] Loading order affects QIcon state and mode when adding svg images

    XMLWordPrintable

Details

    Description

      When adding multiple svg images to a QIcon, if the first image is added with a mode and state value different from the default values (QIcon::Normal and QIcon::Off), the specified values are ignored, i.e. the image is added with Normal state and Off mode.

          QIcon icon1;
          icon1.addFile(":images/green.svg", QSize(), QIcon::Normal, QIcon::Off); 
          // Image is added with specified mode and state
          icon1.addFile(":images/red.svg", QSize(), QIcon::Normal, QIcon::On);
      
          QIcon icon2;
          // Image is added with Normal mode and Off State; specified state ignored 
          icon2.addFile(":images/red.svg", QSize(), QIcon::Normal, QIcon::On); 
          icon2.addFile(":images/green.svg", QSize(), QIcon::Normal, QIcon::Off);
      

      To reproduce, run the attached example project.

      Attachments

        1. qtbug135483.zip
          2 kB
          Lysandra Sola

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              qt.team.quick.subscriptions Qt Quick and Widgets Team
              lysandra.sola Lysandra Sola
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes