How to add a QWidget to a QMenuBar?

2019-09-11 05:17发布

I want to add a QLabel to a QMenuBar. I was able to add a QLabel to a QMenu using QActionWidget, but I want the QLabel to sit on the QMenuBar (as a substitute for a QMenu) at the right end of my application. I intend to add a movie to this QLabel in order to simulate a loading circle to indicate that the application is running. How can I add a QWidget to a QMenuBar, or is there some alternative to my ultimate goal? I am using Qt 5.6 with Qt Designer

标签: qt qmenubar
1条回答
我欲成王,谁敢阻挡
2楼-- · 2019-09-11 05:29

A widget can be added to the end of the menu-bar with QMenuBar::setCornerWidget.

查看更多
登录 后发表回答