本文整理汇总了Python中pyqtgraph.GraphicsLayoutWidget.setMinimumSize方法的典型用法代码示例。如果您正苦于以下问题:Python GraphicsLayoutWidget.setMinimumSize方法的具体用法?Python GraphicsLayoutWidget.setMinimumSize怎么用?Python GraphicsLayoutWidget.setMinimumSize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类pyqtgraph.GraphicsLayoutWidget
的用法示例。
在下文中一共展示了GraphicsLayoutWidget.setMinimumSize方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: Ui_MainWindow
# 需要导入模块: from pyqtgraph import GraphicsLayoutWidget [as 别名]
# 或者: from pyqtgraph.GraphicsLayoutWidget import setMinimumSize [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1348, 946)
MainWindow.setMinimumSize(QtCore.QSize(0, 0))
MainWindow.setStyleSheet(_fromUtf8("\n"
"/*\n"
" Android Material Dark\n"
" COLOR_DARK = #212121 Grey 900\n"
" COLOR_MEDIUM = #424242 Grey 800\n"
" COLOR_MEDLIGHT = #757575 Grey 600\n"
" COLOR_LIGHT = #DDDDDD White\n"
" COLOR_ACCENT = #3F51B5 Indigo 500\n"
"*/\n"
"\n"
"* {\n"
" background:qlineargradient(spread:pad, x1:0.517, y1:0.25, x2:1, y2:1, stop:0.211207 rgba(0, 0, 0, 255), stop:0.456897 rgba(39, 103, 106, 255), stop:1 rgba(255, 255, 255, 255));\n"
" color: #DDDDDD;\n"
" border: 1px solid #757575;\n"
"}\n"
"\n"
"QWidget::item:selected {\n"
" background: #3F51B5;\n"
"}\n"
"\n"
"QCheckBox, QRadioButton {\n"
" border: none;\n"
"}\n"
"\n"
"QRadioButton::indicator, QCheckBox::indicator {\n"
" width: 13px;\n"
" height: 13px;\n"
"}\n"
"\n"
"QRadioButton::indicator::unchecked, QCheckBox::indicator::unchecked {\n"
" border: 1px solid #757575;\n"
" background: none;\n"
"}\n"
"\n"
"QRadioButton::indicator:unchecked:hover, QCheckBox::indicator:unchecked:hover {\n"
" border: 1px solid #DDDDDD;\n"
"}\n"
"\n"
"QRadioButton::indicator::checked, QCheckBox::indicator::checked {\n"
" border: 1px solid #757575;\n"
" background: #757575;\n"
"}\n"
"\n"
"QRadioButton::indicator:checked:hover, QCheckBox::indicator:checked:hover {\n"
" border: 1px solid #DDDDDD;\n"
" background: #DDDDDD;\n"
"}\n"
"\n"
"QGroupBox {\n"
" margin-top: 6px;\n"
"}\n"
"\n"
"QGroupBox::title {\n"
" top: -7px;\n"
" left: 7px;\n"
"}\n"
"\n"
"QScrollBar {\n"
" border: 1px solid #757575;\n"
" background: #212121;\n"
"}\n"
"\n"
"QScrollBar:horizontal {\n"
" height: 15px;\n"
" margin: 0px 0px 0px 32px;\n"
"}\n"
"\n"
"QScrollBar:vertical {\n"
" width: 15px;\n"
" margin: 32px 0px 0px 0px;\n"
"}\n"
"\n"
"QScrollBar::handle {\n"
" background: #424242;\n"
" border: 1px solid #757575;\n"
"}\n"
"\n"
"QScrollBar::handle:horizontal {\n"
" border-width: 0px 1px 0px 1px;\n"
"}\n"
"\n"
"QScrollBar::handle:vertical {\n"
" border-width: 1px 0px 1px 0px;\n"
"}\n"
"\n"
"QScrollBar::handle:horizontal {\n"
" min-width: 20px;\n"
"}\n"
"\n"
"QScrollBar::handle:vertical {\n"
" min-height: 20px;\n"
"}\n"
"\n"
"QScrollBar::add-line, QScrollBar::sub-line {\n"
" background:#424242;\n"
#.........这里部分代码省略.........
示例2: Ui_MainWindow
# 需要导入模块: from pyqtgraph import GraphicsLayoutWidget [as 别名]
# 或者: from pyqtgraph.GraphicsLayoutWidget import setMinimumSize [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(1118, 728)
MainWindow.setMinimumSize(QtCore.QSize(256, 256))
MainWindow.setMaximumSize(QtCore.QSize(1118, 16777215))
self.centralwidget = QtWidgets.QWidget(MainWindow)
self.centralwidget.setObjectName("centralwidget")
self.histogram_groupBox_2 = QtWidgets.QGroupBox(self.centralwidget)
self.histogram_groupBox_2.setGeometry(QtCore.QRect(440, 520, 671, 171))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.histogram_groupBox_2.sizePolicy().hasHeightForWidth())
self.histogram_groupBox_2.setSizePolicy(sizePolicy)
self.histogram_groupBox_2.setMinimumSize(QtCore.QSize(100, 100))
self.histogram_groupBox_2.setMaximumSize(QtCore.QSize(700, 283))
self.histogram_groupBox_2.setObjectName("histogram_groupBox_2")
self.logOutput = QtWidgets.QTextEdit(self.histogram_groupBox_2)
self.logOutput.setGeometry(QtCore.QRect(10, 30, 651, 131))
font = QtGui.QFont()
font.setFamily("Courier")
self.logOutput.setFont(font)
self.logOutput.setObjectName("logOutput")
self.imageData_groupBox = QtWidgets.QGroupBox(self.centralwidget)
self.imageData_groupBox.setGeometry(QtCore.QRect(10, 0, 1100, 312))
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.imageData_groupBox.sizePolicy().hasHeightForWidth())
self.imageData_groupBox.setSizePolicy(sizePolicy)
self.imageData_groupBox.setMinimumSize(QtCore.QSize(1100, 100))
self.imageData_groupBox.setMaximumSize(QtCore.QSize(1100, 312))
self.imageData_groupBox.setObjectName("imageData_groupBox")
self.label = QtWidgets.QLabel(self.imageData_groupBox)
self.label.setGeometry(QtCore.QRect(10, 520, 521, 16))
self.label.setWordWrap(True)
self.label.setObjectName("label")
self.layoutWidget = QtWidgets.QWidget(self.imageData_groupBox)
self.layoutWidget.setGeometry(QtCore.QRect(10, 20, 1091, 291))
self.layoutWidget.setObjectName("layoutWidget")
self.largeimage_horizontalLayout = QtWidgets.QHBoxLayout(self.layoutWidget)
self.largeimage_horizontalLayout.setSizeConstraint(QtWidgets.QLayout.SetMinAndMaxSize)
self.largeimage_horizontalLayout.setContentsMargins(0, 0, 0, 0)
self.largeimage_horizontalLayout.setObjectName("largeimage_horizontalLayout")
self.main_graphicsView = GraphicsLayoutWidget(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.main_graphicsView.sizePolicy().hasHeightForWidth())
self.main_graphicsView.setSizePolicy(sizePolicy)
self.main_graphicsView.setMinimumSize(QtCore.QSize(778, 256))
self.main_graphicsView.setMaximumSize(QtCore.QSize(778, 256))
self.main_graphicsView.setSizeIncrement(QtCore.QSize(1, 1))
self.main_graphicsView.setFrameShape(QtWidgets.QFrame.NoFrame)
self.main_graphicsView.setAlignment(QtCore.Qt.AlignCenter)
self.main_graphicsView.setObjectName("main_graphicsView")
self.largeimage_horizontalLayout.addWidget(self.main_graphicsView)
self.graphicsView_colorbar = GraphicsView(self.layoutWidget)
sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding, QtWidgets.QSizePolicy.MinimumExpanding)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.graphicsView_colorbar.sizePolicy().hasHeightForWidth())
self.graphicsView_colorbar.setSizePolicy(sizePolicy)
self.graphicsView_colorbar.setMinimumSize(QtCore.QSize(30, 128))
self.graphicsView_colorbar.setMaximumSize(QtCore.QSize(25, 256))
self.graphicsView_colorbar.setSizeIncrement(QtCore.QSize(1, 1))
self.graphicsView_colorbar.setObjectName("graphicsView_colorbar")
self.largeimage_horizontalLayout.addWidget(self.graphicsView_colorbar)
self.verticalLayout_3 = QtWidgets.QVBoxLayout()
self.verticalLayout_3.setSizeConstraint(QtWidgets.QLayout.SetMaximumSize)
self.verticalLayout_3.setContentsMargins(-1, 5, -1, 5)
self.verticalLayout_3.setSpacing(0)
self.verticalLayout_3.setObjectName("verticalLayout_3")
self.dispmax_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.layoutWidget)
self.dispmax_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.dispmax_doubleSpinBox.setDecimals(3)
self.dispmax_doubleSpinBox.setObjectName("dispmax_doubleSpinBox")
self.verticalLayout_3.addWidget(self.dispmax_doubleSpinBox)
spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_3.addItem(spacerItem)
self.resetDispLimits_Button = QtWidgets.QPushButton(self.layoutWidget)
self.resetDispLimits_Button.setObjectName("resetDispLimits_Button")
self.verticalLayout_3.addWidget(self.resetDispLimits_Button)
self.resetDispSmart_Button = QtWidgets.QPushButton(self.layoutWidget)
self.resetDispSmart_Button.setObjectName("resetDispSmart_Button")
self.verticalLayout_3.addWidget(self.resetDispSmart_Button)
self.saveDisp_Button = QtWidgets.QPushButton(self.layoutWidget)
self.saveDisp_Button.setObjectName("saveDisp_Button")
self.verticalLayout_3.addWidget(self.saveDisp_Button)
self.setMask_Button = QtWidgets.QPushButton(self.layoutWidget)
self.setMask_Button.setObjectName("setMask_Button")
self.verticalLayout_3.addWidget(self.setMask_Button)
spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
self.verticalLayout_3.addItem(spacerItem1)
self.dispmin_doubleSpinBox = QtWidgets.QDoubleSpinBox(self.layoutWidget)
self.dispmin_doubleSpinBox.setAlignment(QtCore.Qt.AlignRight|QtCore.Qt.AlignTrailing|QtCore.Qt.AlignVCenter)
self.dispmin_doubleSpinBox.setDecimals(3)
self.dispmin_doubleSpinBox.setObjectName("dispmin_doubleSpinBox")
self.verticalLayout_3.addWidget(self.dispmin_doubleSpinBox)
#.........这里部分代码省略.........
示例3: Ui_MainWindow
# 需要导入模块: from pyqtgraph import GraphicsLayoutWidget [as 别名]
# 或者: from pyqtgraph.GraphicsLayoutWidget import setMinimumSize [as 别名]
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName(_fromUtf8("MainWindow"))
MainWindow.resize(1472, 964)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(MainWindow.sizePolicy().hasHeightForWidth())
MainWindow.setSizePolicy(sizePolicy)
self.centralwidget = QtGui.QWidget(MainWindow)
self.centralwidget.setObjectName(_fromUtf8("centralwidget"))
self.gridLayout_10 = QtGui.QGridLayout(self.centralwidget)
self.gridLayout_10.setObjectName(_fromUtf8("gridLayout_10"))
self.horizontalLayout_8 = QtGui.QHBoxLayout()
self.horizontalLayout_8.setObjectName(_fromUtf8("horizontalLayout_8"))
self.widget_2 = QtGui.QWidget(self.centralwidget)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
sizePolicy.setHorizontalStretch(1)
sizePolicy.setVerticalStretch(1)
sizePolicy.setHeightForWidth(self.widget_2.sizePolicy().hasHeightForWidth())
self.widget_2.setSizePolicy(sizePolicy)
self.widget_2.setMinimumSize(QtCore.QSize(0, 845))
self.widget_2.setMaximumSize(QtCore.QSize(16777215, 16777215))
self.widget_2.setObjectName(_fromUtf8("widget_2"))
self.gridLayout_12 = QtGui.QGridLayout(self.widget_2)
self.gridLayout_12.setSizeConstraint(QtGui.QLayout.SetFixedSize)
self.gridLayout_12.setObjectName(_fromUtf8("gridLayout_12"))
self.groupBox = QtGui.QGroupBox(self.widget_2)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
self.groupBox.setSizePolicy(sizePolicy)
self.groupBox.setMinimumSize(QtCore.QSize(300, 0))
self.groupBox.setMaximumSize(QtCore.QSize(300, 461))
self.groupBox.setFlat(False)
self.groupBox.setCheckable(False)
self.groupBox.setObjectName(_fromUtf8("groupBox"))
self.verticalLayout_2 = QtGui.QVBoxLayout(self.groupBox)
self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
self.ExperimentTabWidget = QtGui.QTabWidget(self.groupBox)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(self.ExperimentTabWidget.sizePolicy().hasHeightForWidth())
self.ExperimentTabWidget.setSizePolicy(sizePolicy)
self.ExperimentTabWidget.setObjectName(_fromUtf8("ExperimentTabWidget"))
self.SSX = QtGui.QWidget()
self.SSX.setObjectName(_fromUtf8("SSX"))
self.gridLayout = QtGui.QGridLayout(self.SSX)
self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
self.label = QtGui.QLabel(self.SSX)
self.label.setObjectName(_fromUtf8("label"))
self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
self.RootSSX = QtGui.QLineEdit(self.SSX)
self.RootSSX.setObjectName(_fromUtf8("RootSSX"))
self.gridLayout.addWidget(self.RootSSX, 0, 1, 1, 1)
self.label_2 = QtGui.QLabel(self.SSX)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
self.FileExtensionSSX = QtGui.QLineEdit(self.SSX)
self.FileExtensionSSX.setObjectName(_fromUtf8("FileExtensionSSX"))
self.gridLayout.addWidget(self.FileExtensionSSX, 1, 1, 1, 1)
self.ExperimentTabWidget.addTab(self.SSX, _fromUtf8(""))
self.verticalLayout_2.addWidget(self.ExperimentTabWidget)
self.gridLayout_2 = QtGui.QGridLayout()
self.gridLayout_2.setObjectName(_fromUtf8("gridLayout_2"))
self.DataPathBut = QtGui.QPushButton(self.groupBox)
self.DataPathBut.setObjectName(_fromUtf8("DataPathBut"))
self.gridLayout_2.addWidget(self.DataPathBut, 0, 0, 1, 1)
self.DataPath = QtGui.QLineEdit(self.groupBox)
self.DataPath.setObjectName(_fromUtf8("DataPath"))
self.gridLayout_2.addWidget(self.DataPath, 0, 1, 1, 1)
self.ResPathBut = QtGui.QPushButton(self.groupBox)
self.ResPathBut.setObjectName(_fromUtf8("ResPathBut"))
self.gridLayout_2.addWidget(self.ResPathBut, 1, 0, 1, 1)
self.ResultsPath = QtGui.QLineEdit(self.groupBox)
self.ResultsPath.setText(_fromUtf8(""))
self.ResultsPath.setObjectName(_fromUtf8("ResultsPath"))
self.gridLayout_2.addWidget(self.ResultsPath, 1, 1, 1, 1)
self.DarkPathBut = QtGui.QPushButton(self.groupBox)
self.DarkPathBut.setObjectName(_fromUtf8("DarkPathBut"))
self.gridLayout_2.addWidget(self.DarkPathBut, 2, 0, 1, 1)
self.DarkPath = QtGui.QLineEdit(self.groupBox)
self.DarkPath.setObjectName(_fromUtf8("DarkPath"))
self.gridLayout_2.addWidget(self.DarkPath, 2, 1, 1, 1)
self.MaskPathBut = QtGui.QPushButton(self.groupBox)
self.MaskPathBut.setObjectName(_fromUtf8("MaskPathBut"))
self.gridLayout_2.addWidget(self.MaskPathBut, 3, 0, 1, 1)
self.MaskPath = QtGui.QLineEdit(self.groupBox)
self.MaskPath.setObjectName(_fromUtf8("MaskPath"))
self.gridLayout_2.addWidget(self.MaskPath, 3, 1, 1, 1)
self.label_8 = QtGui.QLabel(self.groupBox)
self.label_8.setAlignment(QtCore.Qt.AlignCenter)
self.label_8.setObjectName(_fromUtf8("label_8"))
self.gridLayout_2.addWidget(self.label_8, 4, 0, 1, 1)
self.cpus = QtGui.QLineEdit(self.groupBox)
self.cpus.setObjectName(_fromUtf8("cpus"))
self.gridLayout_2.addWidget(self.cpus, 4, 1, 1, 1)
self.verticalLayout_2.addLayout(self.gridLayout_2)
#.........这里部分代码省略.........