我的项目中有奇怪的 qml 错误,
Warning: QQml_colorProvider: no color provider has been set!
"qrc:/gui/FirstPage.qml:5 Type GuiPage unavailable
qrc:/gui/GuiPage.qml:4 Invalid property assignment: color expected
这是我的 GuiPage.qml:
import QtQuick 2.1
Rectangle {
color:"transparent"
implicitWidth: 380
implicitHeight: 350
property string pageName: "sample"
property bool active : false
readonly property int firstPage: 1
readonly property int lastPage: 2
readonly property int normalPage : 3
property int pageType : firstPage
signal pageActivate
signal pageClose
property bool hasBlockers: false
property int pageId: 0
property QtObject fontLoader: FontLoader{
source: "font/Cuprum-Regular.ttf"
}
}
我使用了来自 git stable 分支的最后一个 Qt,静态构建。