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

Problems with opacity of 2D elements in Viewport

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • 5.7.0
    • Qt3D TP2
    • Qt3D
    • None
    • Qt5 on Kubuntu

    Description

      Consider following code:

      import QtQuick 2.0
      import Qt3D 1.0
      
      Viewport {
          width: 500
          height: 500
          Rectangle {
              id: rect
              width: 50
              height: 50
              MouseArea {
                  hoverEnabled: true;
                  anchors.fill: rect;
                  onEntered: rect.color="white";
                  onExited: rect.color="grey"
              }
          }
      
          Rectangle {
              width: 400
              height: 400
              x: 50
              y: 50
              opacity: 0.1
          }
      }
      

      Now enter and exit the MouseAre several times.

      The small rectangle has a MousArea with hover enabled and on every entry or exit, the color of this small rectangle is changed. This works without problems.

      The bigger rectangle however has an opacity and every time the color of the small rectangle is changed, the whole 2D content is is overpainted, without clearing it before. This increases the opacity of the bigger rectangle everytime the color of the small rectangle is changed.

      Attachments

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

        Activity

          People

            dpope Daniel Pope (closed Nokia identity) (Inactive)
            bomb3rman Fabian Bumberger
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes