今天在用Qt Designer设计主窗口的ToolBar时遇到一个很诡异的问题,首先从menu菜单里面新建一个Actionpen,把它拖动到了ToolBar里面,并且为这个action定义了图标,tooltip等信息。
后来发现action不能用buttongroup来定义互斥的check,而且toolbar里面无法拖入QPushButton,只能拖入Action。于是想了一想把所有从Qt Designer定义的Action都删了,删掉ToolBar里面的action我用右击->remove action ‘xxx’,只留下一个空的QToolBar。其他在程序里面写。
好吧,这还不是[......]






近期评论