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

wasm: drop shadow steals keyboard input

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • P2: Important
    • None
    • 5.13.0 Alpha 1
    • QPA
    • None

    Description

      From email:

      Dongmei Wang

      I was trying to add a drop shadow effect on a rectangular box using layer.effect. There is a TextEdit item inside the rectangular box. I could see the drop shadow effect around the box; however, there was no response when clicking on the TextEdit item. It appears that this issue is related to item layers. Is item layers supported in Qt for WebAssembly?
      >>
      >> The code is like:
      >> Rectangle {
      >> id: background
      >> anchors.top: parent.top
      >> anchors.topMargin: 50
      >> anchors.horizontalCenter: parent.horizontalCenter
      >> border.width: 1
      >> border.color: "black"
      >> width: 120
      >> height: 30
      >> layer.enabled: true
      >> layer.effect: DropShadow

      { >> horizontalOffset: 0 >> verticalOffset: 3 >> radius: 12 >> color: "#80000000" >> samples: 2 * radius + 1 >> spread: 0 >> transparentBorder: true >> }

      >> TextEdit

      { >> id: text >> anchors.fill: parent >> text: "enter text..." >> }

      >> }

       

      Morten:

      > Yes, looks like this does not work properly.
      >
      > The sample code ends up creating a second (offscreen) QWindow for the layer, which I think steals the keyboard input.
      >
      > We could try to improve handling of QOffscreenSurface QWindows in the wasm platform plugin, or perhaps implement QPlatformIntegration::createPlatformOffscreenSurface() to avoid creating the extra QWindow.
      >

       

      Attachments

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

        Activity

          People

            qt.team.graphics.and.multimedia Qt Graphics Team
            lpotter Lorn Potter
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes