QT 给QWidget增加QToolBar 关二爷 2023-02-11 270 阅读1分钟 先看效果 原QToolBar的控件的位置是 QHBoxLayout,在UI文件中找到这个QHBoxLayout,然后将class="QHBoxLayout"更改为class="tbTableView" <widget class="QToolBar" name="tbTableView"> <addaction name="actAdd"/> <addaction name="actRemove"/> </widget>