from PyQt5 import QtWidgets,QtCore,QtGui
import sys
app = QtWidgets.QApplication(sys.argv)
tabs = QtWidgets.QTabWidget()
widget1 = QtWidgets.QWidget()
widget2 = QtWidgets.QWidget()
tabs.addTab(widget1, "标签一")
tabs.addTab(widget2, "标签二")
tabs.setTabPosition(2) #设置纵向
tabs.show()
sys.exit(app.exec_())
PyQt 标签页TabWidget纵向(竖直)排列
最新推荐文章于 2024-04-24 18:49:53 发布