gpt4 book ai didi

c++ - Qt5右上角QMenuBar中如何设置按钮?

转载 作者:塔克拉玛干 更新时间:2023-11-03 02:03:49 25 4
gpt4 key购买 nike

我需要在 QMenuBar 的右侧(在左侧的常用菜单项中)添加两个按钮,并时不时地更改它的图标。可能吗?

最佳答案

I need to add two buttons at right side of QMenuBar (in left usual menu items)

这个问题可能会回答如何将按钮添加到菜单栏的右侧: Stacking QPushButtons on the other side of a QMenuBar .

and change it icons time by time

您可以使用 QTimer定期触发插槽。在插槽内,使用 QPushBtton::setIcon()更改图标。

关于c++ - Qt5右上角QMenuBar中如何设置按钮?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15337631/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com