Problem with FullScreen app on Mac OS X Mavericks



  • Hello,
    I have a problem with my QtQuick app on Mac OS X Mavericks. The app is supposed to be FullScreen but it doesn't behave as expected.

    I'm using Qt 5.4.1, but the same problem happens with Qt 5.2.1 and Qt 5.3.

    Here's a small example demonstrating the problem:

    import QtQuick 2.4
    import QtQuick.Window 2.2
    
    Window {
    id: mainWindow
    visible: true
    visibility: Window.FullScreen
    MouseArea {
    anchors.fill: parent
    onClicked: Qt.quit()
    
    Rectangle {
    color: "orange"
    width: 80
    height: 80
    anchors.top: parent.top
    anchors.right: parent.right
    Text {
    anchors.centerIn: parent
    text: "Minimize"
    }
    
    MouseArea {
    anchors.fill: parent
    onClicked: mainWindow.showMinimized()
    }
    }
    }
    onVisibilityChanged: console.log("visibility: " + mainWindow.visibility)
    }
    

    The problem is that the application doesn't really run in FullScreen, because I can still see the window frame and the dock. if that is intended behavior, how do I go around it? Is there some combination of flags that I can set to get the proper behavior? I've tried setting "flags: Qt.WindowFullScreen", but then I can't minimized the app properly.

    I have also noticed that onVisibilityChanged doesn't report expected values. Initially, it will be set to 5 (FullScreen), then when I minimize the application it will be set to 3 (Minimized), and then when I click the application icon in the dock, it will be set to 2 (Windowed) instead of 5 (FullScreen) again. So it seems like visibility isn't restored correctly.

    Please help, I'm going crazy with this.

    Edited: Please use ``` (3 backticks) for code blocks - p3c0


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.