使工具栏混合到标题栏中

时间:2015-02-17 08:09:49

标签: python qt pyqt

我有一些简单的代码用于生成工具栏,结果如下:

enter image description here

工具栏和标题栏不同。有没有办法让工具栏融入标题栏,如:

enter image description here

到目前为止,这是我的代码

def initToolbar(self):

  self.toolbar = self.addToolBar("Options")

  # Makes the next toolbar appear underneath this one
  self.addToolBarBreak()

def initMenubar(self):

  menubar = self.menuBar()

  file = menubar.addMenu("File")
  edit = menubar.addMenu("Edit")
  view = menubar.addMenu("View")

def initUI(self):

    self.text = QtGui.QTextEdit(self)
    self.setCentralWidget(self.text)

    self.initToolbar()
    self.initMenubar()

    ...

由于

1 个答案:

答案 0 :(得分:2)