0
我想在我的C++/qt/qml應用程序中添加啓動畫面。我添加以下代碼:使用qml + QQuickView作爲啓動屏幕不工作
}
而且Splash.qml文件:
import QtQuick 2.0
import QtQuick.Controls 2.1
Item {
visible: true
width: 640
height: 480
BusyIndicator {
anchors.centerIn: parent
width: 100
height: 100
running: true
Component.onCompleted: {
console.log("splash screen... " + x + " " + y + " " + width + "x" + height)
visible=true
}
}
}
當應用程序被啓動,該消息:「QML:閃屏... 270 190 100x100「,但QQuickWindow只是白色。 main.qml的主窗口可以正常工作。我試圖在Splash.qml中加載一個圖像,但同樣的問題。而且,我不能使它成爲使用QQuickView :: setWindowFlags的無框窗口。我正在使用win7 64位操作系統。