如何更改qt quick controls2中工具提示的字体?
我想更改工具提示的字体系列,但出现以下错误 QQmlApplicationEngine未能加载组件 qrc:/main.qml:132类型书页不可用 qrc:/pages/BookPage.qml:41类型BookItem不可用 qrc:/pages/BookItem.qml:102无法分配给不存在的属性字体如何更改qt quick controls2中工具提示的字体?,qt,qml,qtquick2,qtquickcontrols2,Qt,Qml,Qtquick2,Qtquickcontrols2,我想更改工具提示的字体系列,但出现以下错误 QQmlApplicationEngine未能加载组件 qrc:/main.qml:132类型书页不可用 qrc:/pages/BookPage.qml:41类型BookItem不可用 qrc:/pages/BookItem.qml:102无法分配给不存在的属性字体 QML不支持有多个嵌套级别,因此通常会观察到这种类型的问题,适当减少它,如下所示: ToolButton{ id: tbtnStatistics ToolTip{
QML不支持有多个嵌套级别,因此通常会观察到这种类型的问题,适当减少它,如下所示:
ToolButton{
id: tbtnStatistics
ToolTip{
visible: tbtnStatistics.down
delay: Qt.styleHints.mousePressAndHoldInterval
text: "This is Tooltip"
font.family: "tahoma"
timeout: 4000
}
contentItem: Image {
fillMode: Image.Pad
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "../images/statistics.png"
}
}
ToolButton{
id: tbtnStatistics
ToolTip{
visible: tbtnStatistics.down
delay: Qt.styleHints.mousePressAndHoldInterval
text: "This is Tooltip"
font.family: "tahoma"
timeout: 4000
}
contentItem: Image {
fillMode: Image.Pad
anchors.horizontalCenter: parent.horizontalCenter
anchors.verticalCenter: parent.verticalCenter
source: "../images/statistics.png"
}
}