A good suggestion from @Minh... that would provide quite a bit of flexibility. However, this answer suggested using the 'corner widget' which sounded better since I won't lose some of the given functionality of QTabWidget
.
I gave it a try and it does what I wanted; within my QTabWidget
class, I now have:
# Image and text labels
qlabel_img = QtWidgets.QLabel()
pixmap = QtGui.QPixmap('image.png')
qlabel_img.setPixmap(pixmap)
qlabel_txt = QtWidgets.QLabel(f"Text under image")
# Corner widget
corner_widget = QtWidgets.QWidget()
corner_layout = QtWidgets.QVBoxLayout()
corner_layout.addWidget(qlabel_img)
corner_layout.addWidget(qlabel_txt)
corner_widget.setLayout(corner_layout)
self.setCornerWidget(corner_widget)
and so corner_widget
is displayed at the top right (right justified) of the tab widget.