在全屏和窗口模式之间切换

时间:2018-07-20 05:38:53

标签: qt qml

我的问题与此有关:Full-screen desktop application with QML

这是我的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;
        }
    }
}

在此示例中,当我单击按钮时,我尝试从窗口模式转到全屏,反之亦然。我的问题是,从全屏模式转到全屏模式是可行的,但是从全屏模式切换到全屏模式却没有。要从全屏进入窗口模式,有什么特殊要求吗?

1 个答案:

答案 0 :(得分:3)

在Ubuntu上,使用library(data.table) temp <- fread( "id status timestamp 1 assigned 2017-01-02 1 done 2017-01-03 1 locked 2017-01-04 2 assigned 2017-01-02 2 done 2017-01-03 2 assigned 2017-01-03 2 done 2017-01-04 2 locked 2017-01-05 3 assigned 2017-01-02 3 done 2017-01-03 3 locked 2017-01-04 ") 使窗口可见(默认窗口)。请检查QML window example

Window.AutomaticVisibility