When I resize a Qt Quick ApplicationWindow
that contains a Frame
with an InnerShadow
, I see flickering and visual artifacts. The same is not true when I either do not replace the default border or if I use a simple rectangle for the Frame
object.
I tested this on my laptop that runs a 64-bit Arch Linux
. It has an Nvidia GTX 1060 Max Q graphics card and an integrated Intel graphics card. I ran the code both with and without bumblebee
.
Any way to work around or eliminate this flickering? It is pretty bad. My code and some screen-grabs are as below
EDIT: I have tried setting AA_ShareOpenGLContexts
and AA_UseOpenGLES
(and its software/desktop variants) attributes with no luck.
UPDATE: I have created an issue here: https://bugreports.qt.io/browse/QTBUG-81519, but I am still hoping someone can devise a workaround.
test.qml
import QtQuick 2.14
import QtQuick.Controls 2.14
import QtGraphicalEffects 1.14
ApplicationWindow{
id: main
width: 2*screen.width/3
height: 2*screen.height/3
title: "Test ApplicationWindow"
color: activeColorPalette.window
visible:true
SystemPalette {
id: activeColorPalette
colorGroup: SystemPalette.Active
}
Frame{
anchors.fill: parent
anchors.margins: 10
background: Item{
id: root
anchors.fill: parent
Rectangle{
anchors.fill: parent
anchors.margins: 1
radius: 16
color: activeColorPalette.window
}
InnerShadow {
anchors.fill: root
horizontalOffset: 0
verticalOffset: 0
source: root
radius: 16
color: activeColorPalette.shadow
spread: 0.6
samples: 32
cached: true
fast:true
}
}
}
}
Window without flickering or artifacts
Window with flickering/visual artifacts while resizing