Details
-
Bug
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
5.12.3
-
None
-
Windows and Linux, Qt 5.12
Description
When using a graphical effects component (DropShadow for instance) on an Item that contains a Quick Controls 2 element (Button for instance) the control's background stop being displayed correctly. Here is a small repro:
import QtQuick 2.12 import QtQuick.Controls 2.12 import QtGraphicalEffects 1.12 Pane { id: root width: 300 height: 150 Pane { id: content visible: false width: 200 height: 50 Button { anchors.centerIn: parent text: "Where's my BG ?" } } DropShadow { anchors.fill: content source: content radius: 10 samples: 21 } Button { anchors.top: content.bottom anchors.topMargin: 10 text: "This is how I should look" } }
If you save this to `test.qml` and run it through `qmlscene`, you'll get this:
It seems to work, but: if you click the second button, there's an animation on the background, whereas if you click the first one, nothing happens.
Now if you run the same test using Material style (e.g. run `qmlscene --style Material test.qml`) then you get this:
Now the background of the first button is not even visible.
I've tested this on Windows and Linux, on Qt 5.12.
Edit: It's not only visual, the controls just do not catch inputs (for instance if you use a SpinBox instead of the Button in the example, you can't use it at all.