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

QML ChartView series color can get wrong on RHI if useOpenGL

    XMLWordPrintable

Details

    • Linux/Wayland, Windows
    • 61011ff6c1 (qt/qtcharts/dev) 2e98d87547 (qt/qtcharts/6.3) adaa37ad7d (qt/qtcharts/6.2) adaa37ad7d (qt/qtcharts/6.2.4) adaa37ad7d (qt/tqtc-qtcharts/6.2) adaa37ad7d (qt/tqtc-qtcharts/6.2.4) 2e98d87547 (qt/tqtc-qtcharts/6.3) 61011ff6c1 (qt/tqtc-qtcharts/dev)

    Description

      In the attached ChartView, the series should be rendered as red line, but actually as black.

      Window {
          width: 600
          height: 600
          visible: true
      
          ChartView {
              title: "Line"
              anchors.fill: parent
      
              LineSeries {
                  color: "red"
                  width: 4
                  useOpenGL: true
      
                  XYPoint { x: 0; y: 0 }
                  XYPoint { x: 1.1; y: 2.1 }
                  XYPoint { x: 1.9; y: 3.3 }
                  XYPoint { x: 2.1; y: 2.1 }
                  XYPoint { x: 2.9; y: 4.9 }
                  XYPoint { x: 3.4; y: 3.0 }
                  XYPoint { x: 4.1; y: 3.3 }
              }
          }
      
          Text {
              font.pixelSize: 20
              text: "whatever overlay text to change OpenGL blending mode"
              //visible: false
          }
      }
      

      Removing the overlay text fixes the problem probably because OpenGL blend function wouldn't be altered. (See the attached renderdoc capture for details.)

      I'll send a patch shortly.

      Attachments

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

        Activity

          People

            e0348803 Miikka Heikkinen
            jirauser52013 user-c858f (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes