本文整理匯總了Python中pyqtgraph.GraphicsLayoutWidget.setBaseSize方法的典型用法代碼示例。如果您正苦於以下問題:Python GraphicsLayoutWidget.setBaseSize方法的具體用法?Python GraphicsLayoutWidget.setBaseSize怎麽用?Python GraphicsLayoutWidget.setBaseSize使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類pyqtgraph.GraphicsLayoutWidget
的用法示例。
在下文中一共展示了GraphicsLayoutWidget.setBaseSize方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Ui_MainWindow
# 需要導入模塊: from pyqtgraph import GraphicsLayoutWidget [as 別名]
# 或者: from pyqtgraph.GraphicsLayoutWidget import setBaseSize [as 別名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1280, 800)
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.gridLayout = QtWidgets.QGridLayout(self.centralwidget)
self.gridLayout.setObjectName("gridLayout")
self.splitter_3 = QtWidgets.QSplitter(self.centralwidget)
self.splitter_3.setOrientation(QtCore.Qt.Horizontal)
self.splitter_3.setObjectName("splitter_3")
self.tabWidget = QtWidgets.QTabWidget(self.splitter_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(1)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.tabWidget.sizePolicy().hasHeightForWidth())
self.tabWidget.setSizePolicy(sizePolicy)
self.tabWidget.setObjectName("tabWidget")
self.widget = QtWidgets.QWidget()
self.widget.setObjectName("widget")
self.verticalLayout_2 = QtWidgets.QVBoxLayout(self.widget)
self.verticalLayout_2.setContentsMargins(0, 0, 0, 0)
self.verticalLayout_2.setSpacing(0)
self.verticalLayout_2.setObjectName("verticalLayout_2")
self.treeWidget = QtWidgets.QTreeWidget(self.widget)
self.treeWidget.setEnabled(True)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.treeWidget.sizePolicy().hasHeightForWidth())
self.treeWidget.setSizePolicy(sizePolicy)
font = QtGui.QFont()
font.setFamily("Helvetica Neue")
self.treeWidget.setFont(font)
self.treeWidget.setAutoExpandDelay(-1)
self.treeWidget.setColumnCount(8)
self.treeWidget.setObjectName("treeWidget")
self.treeWidget.headerItem().setText(0, "1")
font = QtGui.QFont()
font.setFamily("Helvetica Neue")
font.setKerning(True)
self.treeWidget.headerItem().setFont(0, font)
self.treeWidget.headerItem().setText(1, "2")
font = QtGui.QFont()
font.setFamily("Helvetica Neue")
self.treeWidget.headerItem().setFont(1, font)
self.treeWidget.headerItem().setText(2, "3")
font = QtGui.QFont()
font.setFamily("Helvetica Neue")
self.treeWidget.headerItem().setFont(2, font)
self.treeWidget.headerItem().setText(3, "4")
font = QtGui.QFont()
font.setFamily("Helvetica Neue")
self.treeWidget.headerItem().setFont(3, font)
self.treeWidget.headerItem().setText(4, "5")
self.treeWidget.headerItem().setText(5, "6")
self.treeWidget.headerItem().setText(6, "7")
self.treeWidget.headerItem().setText(7, "8")
self.treeWidget.header().setDefaultSectionSize(50)
self.treeWidget.header().setMinimumSectionSize(5)
self.treeWidget.header().setSortIndicatorShown(True)
self.verticalLayout_2.addWidget(self.treeWidget)
self.tabWidget.addTab(self.widget, "")
self.tabWidgetPage2 = QtWidgets.QWidget()
self.tabWidgetPage2.setObjectName("tabWidgetPage2")
self.verticalLayout = QtWidgets.QVBoxLayout(self.tabWidgetPage2)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.textBrowser_4 = QtWidgets.QTextBrowser(self.tabWidgetPage2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.textBrowser_4.sizePolicy().hasHeightForWidth())
self.textBrowser_4.setSizePolicy(sizePolicy)
self.textBrowser_4.setBaseSize(QtCore.QSize(300, 0))
font = QtGui.QFont()
font.setPointSize(10)
self.textBrowser_4.setFont(font)
self.textBrowser_4.setObjectName("textBrowser_4")
self.verticalLayout.addWidget(self.textBrowser_4)
self.tabWidget.addTab(self.tabWidgetPage2, "")
self.splitter_2 = QtWidgets.QSplitter(self.splitter_3)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(100)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.splitter_2.sizePolicy().hasHeightForWidth())
self.splitter_2.setSizePolicy(sizePolicy)
self.splitter_2.setOrientation(QtCore.Qt.Vertical)
self.splitter_2.setObjectName("splitter_2")
self.frame_5 = QtWidgets.QFrame(self.splitter_2)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(1)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.frame_5.sizePolicy().hasHeightForWidth())
self.frame_5.setSizePolicy(sizePolicy)
self.frame_5.setMaximumSize(QtCore.QSize(16777215, 180))
self.frame_5.setFrameShape(QtWidgets.QFrame.StyledPanel)
self.frame_5.setFrameShadow(QtWidgets.QFrame.Raised)
self.frame_5.setObjectName("frame_5")
self.horizontalLayout = QtWidgets.QHBoxLayout(self.frame_5)
#.........這裏部分代碼省略.........