Qt World Summit: Register Today!

Issue with ApplicationWindow in FullScreen

  • Hello,

    I have the following inside MainWindow.qml:

    import QtQuick 2.13
    import QtQuick.Controls 2.13
    import QtQuick.Window 2.13
    ApplicationWindow {
        visible: true
        width: Screen.width
        height: Screen.height
        visibility: "FullScreen"
        color: "red"

    and I am loading it inside main.cpp:

    #include <QtQuick>
    int main(int argc, char *argv[])
      QGuiApplication app(argc, argv);
      QQmlApplicationEngine engine;
      if (engine.rootObjects().isEmpty())
        return -1;
      return app.exec();

    As you might expect, upon building and launching this, I get a full, red screen. The issue happens whenever I click somewhere on my 2nd screen, for example in this browser window. My red window immediately disappears, as the browser picks up focus. Upon clicking on my primary screen again, I can see that the application is picking up focus (the taskbar shows it) and no matter where I click on the 1st screen, nothing happens. Alt-tabbing doesn't bring up the red background anywhere, the application is visually transparent and does nothing. My only way of closing it at that point is via Task Manager.

    What am I doing wrong?

  • visibility property of window isn't text.

    visibility: ApplicationWindow.FullScreen

  • @IntruderExcluder I changed that line and I still have the same problem.

Log in to reply