Details
-
Bug
-
Resolution: Duplicate
-
P2: Important
-
None
-
5.13.0 Alpha 1
-
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
>> 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.
>