QT:如何更改进度条的颜色

发布于 2024-08-22 07:50:26 字数 79 浏览 5 评论 0原文

我有一个视频编辑器视图和一个蓝色进度条。 但是,当我单击修剪开始时,如何将进度条颜色更改为红色,当我单击 QT 中的修剪结束按钮时,它将返回蓝色

i am having one videoeditor view and one progressbar is there with blue color .
But how i will change the progressbar color to red when i clicked trim start and it will return to blue when i will click the trim endbutton in QT

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

格子衫的從容 2024-08-29 07:50:26

这是来自 Qt 文档

您可以设置 ::chunk 部分显式更改背景颜色。

This is from the Qt Documentation

You can style the ::chunk part explicitly to change background color.

百思不得你姐 2024-08-29 07:50:26

编辑:我误解了这个问题。您正在谈论 Adob​​e Premiere 中的剪辑选择器/编辑器之类的东西。为了做这样的事情,我只需创建一个自定义小部件,然后自己处理绘图。这不会太难。您需要子类化QWidget,然后重新实现paintEvent(),然后可能还需要实现mousePressEvent()、mouseReleaseEvent() 和mouseMouseEvent()。

EDIT: I misunderstood the question. You are talking about something like the clip selector/editor in Adobe Premiere. To do something like this I would just create a custom widget, and handle the drawing yourself. It would not be too hard. You will need to subclass QWidget, then reimplement the paintEvent(), then also probably the mousePressEvent(), mouseReleaseEvent(), and mouseMouseEvent().

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文