选项卡内的工具栏
问题描述:
是否可以在 QWidget
内添加一个工具栏,该工具栏位于选项卡内(在 QTabWidget
中)?这个想法是为每个选项卡放置一个单独的工具栏.
Is it possible to add a tool bar inside QWidget
that is placed inside a tab (in QTabWidget
) ?
The idea is to put a separate tool bar for each tab.
工具栏好像只能放在QMainWindow
里面.
It seems that tool bars can only be placed inside QMainWindow
.
答
QToolBar
是一个普通的QWidget
,你可以将其添加到布局中.
QToolBar
is an ordinary QWidget
, you can add it to a layout.