将QPushButtons堆叠在QMenuBar的另一侧 [英] Stacking QPushButtons on the other side of a QMenuBar

查看:161
本文介绍了将QPushButtons堆叠在QMenuBar的另一侧的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在QMenuBar的另一侧堆叠一些QPushButton对象.

I want to stack some QPushButton objects on the other side of my QMenuBar.

这是我的窗口现在的样子:

This is how my window looks now:

这就是我想要的样子(我已经对图片进行了照片处理):

And this is how I want it to look like (I've photoshopped the image):

我知道在motif小部件样式中,帮助菜单在右侧对齐,但是我坚持使用plastique,所以对我来说这不是问题.

I know that in the motif widget style, the help menu is aligned to the right, but I'm sticking with plastique, so it's not a problem for me.

我正在使用Qt4.8.有什么想法吗?

I'm using Qt4.8. Any ideas?

推荐答案

QMenuBar具有 setCornerWidget 函数,将小部件(可能包括整个布局)设置为短号小部件.

QMenuBar has a setCornerWidget function, that sets a widget (that may include a whole layout) as the cornet widget.

这篇关于将QPushButtons堆叠在QMenuBar的另一侧的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆