Qt 相当于 GtkInfoBar

发布于 2024-12-26 13:38:58 字数 306 浏览 2 评论 0原文

我刚刚偶然发现了 GtkInfoBar (文档 / 带有屏幕截图的示例)。

我在一些 Qt 应用程序中对此功能有自己的半成品实现。我一直在努力让主题正常工作。

Qt 是否有相当于 GtkInfoBar 的工具?

I just stumbled on GtkInfoBar (Documentation / Example with screen shot).

I have my own half assed implementations of this functionality in some Qt apps. I've struggled to get the themeing to work correctly.

Is there an equivalent of GtkInfoBar for Qt?

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

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

发布评论

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

评论(2

玩心态 2025-01-02 13:38:58

我会使用 QDockWidget
在您的用例中,您必须:

  • 隐藏标题栏
  • 隐藏标题按钮框(如关闭)
  • 禁止移动和浮动选项

然后您可以在其中添加您需要的所有小部件。对于它的主题,您可以像所有其他小部件一样使用样式表。

希望有帮助

I would use a QDockWidget.
In your use case you have to:

  • Hide the title bar
  • Hide title button box (like close)
  • Forbid moving and floating option

Then you can add all the widgets you need in it. For theming it you can use style sheet like for all other widgets.

Hope that helps

柠栀 2025-01-02 13:38:58

我认为最接近您正在寻找的内容是 QStatusBar

我不确定主题,但您可以根据需要向栏中添加删除小部件。

I think that the closest to what you are looking for is the QStatusBar.

I am not sure about themes but you can add an remove widgets to the bar as needed.

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