I set corner widget into QMenuBar that has two QPushButtons. But when I set long text by button's setText, button doesn't change it's weight, so, icon and part of text hiding. So, how to change button's width and width of corner widget when set text?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
Call menuBar()->adjustSize();
after setting the text on the button.
回答2:
I resolved it by setting the same corner widget into QMenuBar again after changing button text.