0

Are there any methods to make the tabs be placed on top? I think it's more suitable. And is there an easy way to name the tabs, maybe add a QLabel.

Below is a picture of how it looks now.

enter image description here

vandelay
  • 1,965
  • 8
  • 35
  • 52
  • Answered here: http://stackoverflow.com/questions/23751503/qt-how-to-show-tabs-of-tabified-dockwidget-at-the-top-instead-of-the-bottom – xyres Aug 22 '16 at 22:04

1 Answers1

2

Use setTabPosition to put the tabs at the top for the relevant dock-areas:

mainwindow.setTabPosition(QtCore.Qt.AllDockWidgetAreas, QtGui.QTabWidget.North)

The tab text is taken from the window title, so it can be set like this:

dockwidget.setWindowTitle('Name')

or indirectly via the QDockWidget constructor:

dockwidget = QtGui.QDockWidget('Name', parent)
ekhumoro
  • 115,249
  • 20
  • 229
  • 336