Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-18421

Designer loses the gradient value in some occasions

    XMLWordPrintable

Details

    Description

      Define gradient for a Rectangle in a QML file in edit mode. Then change to design mode. In some occasions the Color value of the Rectangle is 0xffffff (or rarely 0x000000) instead of the previously set gradient value. And then this 0xfffffff value is saved as the color of the GradientStop and we end up with wrong gradient value even if we haven't even touched the gradient settings.

      There seems to be several ways to get into this trouble by switching between files and edit-design modes. The most straightforward way is to have the cursor inside Rectangle item in edit mode such that the design mode opens with focus in the Rectangle. If we move the cursor to Gradient in edit mode, the design mode opens with the Gradient in focus and the problem is not reproducible.

      See the attached QML file (qtcreatorbug_18421.qml). Open it in Creator's edit mode and move the cursor to the Rectangle with id 'root'. Then switch to design mode and check the Color value: 0xffffff. Then switch back to edit mode (and undo the unwanted change) and move the cursor to Gradient or to the other Rectangle in the file, switch to design mode again and navigate to the 'root' item. The gradient value is correct.

      Attachments

        Activity

          People

            thohartm Thomas Hartmann
            qtcomsupport Qt Support
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: