Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Issue with ApplicationWindow in FullScreen
Forum Updated to NodeBB v4.3 + New Features

Issue with ApplicationWindow in FullScreen

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 524 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    Nikola Ninkov
    wrote on last edited by
    #1

    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[])
    {
      QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
    
      QGuiApplication app(argc, argv);
      QQmlApplicationEngine engine;
    
      engine.load(QUrl(QStringLiteral("qrc:/MainWindow.qml")));
      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?

    1 Reply Last reply
    0
    • IntruderExcluderI Offline
      IntruderExcluderI Offline
      IntruderExcluder
      wrote on last edited by
      #2

      visibility property of window isn't text.

      visibility: ApplicationWindow.FullScreen
      
      N 1 Reply Last reply
      0
      • IntruderExcluderI IntruderExcluder

        visibility property of window isn't text.

        visibility: ApplicationWindow.FullScreen
        
        N Offline
        N Offline
        Nikola Ninkov
        wrote on last edited by
        #3

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

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved