My question is related to this one: Full-screen desktop application with QML
Here is my MWE:
import QtQuick 2.11
import QtQuick.Window 2.2
import QtQuick.Controls 2.2
Window
{
property string windowFull: "FullScreen";
property string windowWindowed: "Windowed";
width: 400
height: 400
visible: true
title: "Example"
visibility: windowFull;
id: theWindow;
Button
{
onClicked:
{
if (theWindow.visibility === windowWindowed)
theWindow.visibility = windowFull;
else
theWindow.visibility = windowWindowed;
}
}
}
In this example I am trying to go from windowed mode to full screen and vice versa when clicking the button. My problem is that going full screen from windowed mode works, but from full screen to windowed does not. Are there any special requirements that has to be made in order to go windowed mode from full screen?