Qt Quick布局按钮在窗口获焦时不显示文本问题求助
Qt QML按钮文本在Mac OS Ventura窗口获焦时消失的问题
在Mac OS Ventura系统下,使用Qt 6.5.2(也曾尝试Qt 6.4.3)遇到如下异常:
- 当应用窗口处于激活焦点状态时,布局内的按钮文本完全无法显示
- 切换到其他应用(如Qt Creator)后,按钮文本恢复正常显示
即使使用极简测试代码新建项目,问题依然复现,测试代码如下:
import QtQuick import QtQuick.Window import QtQuick.Controls import QtQuick.Layouts Window { width: 640 height: 480 visible: true title: qsTr("Busy Indicator Control") RowLayout { width: parent.width height: parent.height Button { id: button1 text: "Running" Layout.fillWidth: true onClicked: { console.log("button pressed") } } Button { id: button2 text: "Not Running" Layout.fillWidth: true } } }
对应现象截图:
- 应用获焦时:

- 聚焦Qt Creator时:

内容的提问来源于stack exchange,提问作者Christian Niekler
相关产品推荐
相关产品推荐

