【问题标题】:Qt Progress Bar: change colourQt进度条:改变颜色
【发布时间】:2017-02-25 23:27:05
【问题描述】:

有没有办法用 Qt 5.7 改变进度条的颜色?

例如,在 Windows 7 上,当出现错误时进度条会变成红色,我想做这样的事情。

【问题讨论】:

    标签: qt progress-bar


    【解决方案1】:

    如果您使用小部件,那么您可以使用样式表。但是,您将无法保持原来的 Windows 7 外观。这是example for the QProgressBar

    对于 QtQuick Progress 组件,您可以使用 style property。这是documentation page with the example

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2011-12-23
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-04-01
      • 1970-01-01
      相关资源
      最近更新 更多