在 C++ 应用程序中使用样式表Qt Widgets Designer

自 Qt 4.2 起,即可使用Qt Widgets Designer 中的样式表编辑器编辑样式表。

表单编辑器的屏幕截图,显示了一个标签和一个行编辑器,其中通过右键菜单更改样式表的选项已被高亮显示 设置样式表

右键单击小部件并选择“更改样式表...”即可调用样式表编辑器。

显示已使用样式表预览的屏幕截图

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.