QML Qt快速控制按钮在Raspberry PI 3B上不显示背景色

QML Qt快速控制按钮在Raspberry PI 3B上不显示背景色,qt,qml,qt5,Qt,Qml,Qt5,我的QML应用程序的按钮在我的按钮上不显示任何背景色 我正在使用Material主题,并尝试更改qtquickcontrols2.conf文件中的设置,但设置button background属性仍然没有成功。看起来这通常会使用强调色,但这种颜色实际上从未设置,但主背景色和前景色确实起作用 示例文件: [Controls] Style=Material [Universal] Theme=System Accent=Yellow Background=Green Foreground=Oran

我的QML应用程序的按钮在我的按钮上不显示任何背景色

我正在使用Material主题,并尝试更改qtquickcontrols2.conf文件中的设置,但设置button background属性仍然没有成功。看起来这通常会使用强调色,但这种颜色实际上从未设置,但主背景色和前景色确实起作用

示例文件:

[Controls]
Style=Material

[Universal]
Theme=System
Accent=Yellow
Background=Green
Foreground=Orange
Primary=Pink


[Material]
Theme=Light
Background=Grey
Foreground=Black
Accent=Purple
Primary=Blue
Palette\Button=#212121
当我记录特定按钮上可用的值时,它变得更有趣:

ml: objectName: 
qml: parent: Button_QMLTYPE_22(0x2100568)
qml: data: [object Object]
qml: resources: [object Object]
qml: children: [object Object]
qml: x: 0
qml: y: 6
qml: z: -1
qml: width: 360
qml: height: 88
qml: opacity: 1
qml: enabled: true
qml: visible: true
qml: visibleChildren: [object Object]
qml: states: [object Object]
qml: transitions: [object Object]
qml: state: 
qml: childrenRect: QRectF(0, 0, 360, 88)
qml: anchors: QQuickAnchors(0x2261900)
qml: left: QVariant(QQuickAnchorLine, )
qml: right: QVariant(QQuickAnchorLine, )
qml: horizontalCenter: QVariant(QQuickAnchorLine, )
qml: top: QVariant(QQuickAnchorLine, )
qml: bottom: QVariant(QQuickAnchorLine, )
qml: verticalCenter: QVariant(QQuickAnchorLine, )
qml: baseline: QVariant(QQuickAnchorLine, )
qml: baselineOffset: 0
qml: clip: false
qml: focus: false
qml: activeFocus: false
qml: activeFocusOnTab: false
qml: rotation: 0
qml: scale: 1
qml: transformOrigin: 4
qml: transformOriginPoint: QPointF(180, 44)
qml: transform: [object Object]
qml: smooth: true
qml: antialiasing: true
qml: implicitWidth: 64
qml: implicitHeight: 36
qml: containmentMask: null
qml: layer: QQuickItemLayer(0x221c2e0)
qml: color: #d6d7d7
qml: gradient: undefined
qml: border: QQuickPen(0x207b528)
qml: radius: 2
我可以看到颜色设置好了,我应该可以看到我的按钮。此数据来自附加到背景属性的所有属性

另一个奇怪的问题是,当我在一个raspberry pi 3b model v1上运行QML应用程序时,我能够显示背景色,而不是raspberry pi 3b model v1.2

我也浏览了源代码:

    background: Rectangle {
        implicitWidth: 64
        implicitHeight: control.Material.buttonHeight

        radius: 2
        color: !control.enabled ? control.Material.buttonDisabledColor :
                control.highlighted ? control.Material.highlightedButtonColor : control.Material.buttonColor

        PaddedRectangle {
            y: parent.height - 4
            width: parent.width
            height: 4
            radius: 2
            topPadding: -2
            clip: true
            visible: control.checkable && (!control.highlighted || control.flat)
            color: control.checked && control.enabled ? control.Material.accentColor : control.Material.secondaryTextColor
        }

        // The layer is disabled when the button color is transparent so you can do
        // Material.background: "transparent" and get a proper flat button without needing
        // to set Material.elevation as well
        layer.enabled: control.enabled && control.Material.buttonColor.a > 0
        layer.effect: ElevationEffect {
            elevation: control.Material.elevation
        }

        Ripple {
            clipRadius: 2
            width: parent.width
            height: parent.height
            pressed: control.pressed
            anchor: control
            active: control.down || control.visualFocus || control.hovered
            color: control.flat && control.highlighted ? control.Material.highlightedRippleColor : control.Material.rippleColor
        }
    }
所有的变量都设置了,应该显示背景,所以我有点困惑

正在运行boot2qt 5.15.2