Fullscreen QML application is flickering when hovering or pressing a button
-
I have a fullscreen QML application that should be displaying a dialog.
Whenever I hover or click on a button the screen flickers like the graphics card was switching modes or something.
This also happens with a demo application that is started standalone or withqmlscene
.System: Qt 5.5.0 on Windows 7 SP1 x64 (and x86)
main.qml:
import QtQuick 2.4 import QtQuick.Dialogs 1.2 import QtQuick.Window 2.2 import QtQuick.Controls 1.3 ApplicationWindow { visible: true Rectangle { anchors.fill: parent Rectangle{ width: 200 height: 200 color: "#00ff00" Button{ id: mouseArea anchors.fill: parent onClicked: { messageDialog.show("Test") } } } } MessageDialog { id: messageDialog title: qsTr("May I have your attention, please?") function show(caption) { messageDialog.text = caption; messageDialog.open(); } } }
Standalone the application is started using
QQuickWindow->showFullScreen()
(the same code that is used in qmlscene)How do I fix that flickering?
As a workaround I currently have the application running frameless and 1px smaller in height than the screen. Then no flickering occurs, but this is not really what I want. Is there some hidden setting, that makes this work on windows? (Apparently this is a windows-only problem) -
@vishnu
This leads to the same situation. Qt or windows seems to recognize an application filling the complete screen and makes it fullscreen, if it is borderless. If it is not borderless this does not work as parts of the application go offscreen by the amount of pixels used by the top bar and borders.