当前位置: 首页>>代码示例>>Python>>正文


Python QtWidgets.QSizePolicy方法代码示例

本文整理汇总了Python中PyQt5.QtWidgets.QSizePolicy方法的典型用法代码示例。如果您正苦于以下问题:Python QtWidgets.QSizePolicy方法的具体用法?Python QtWidgets.QSizePolicy怎么用?Python QtWidgets.QSizePolicy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在PyQt5.QtWidgets的用法示例。


在下文中一共展示了QtWidgets.QSizePolicy方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def __init__(self, name=""):
        super().__init__(name)
        self.leftMargin = 30
        self.chartWidth = 250
        self.chartHeight = 250
        self.minDisplayValue = 0
        self.maxDisplayValue = 100

        self.minValue = -1
        self.maxValue = 1
        self.span = 1

        self.setMinimumSize(self.chartWidth + self.rightMargin + self.leftMargin,
                            self.chartHeight + self.topMargin + self.bottomMargin)
        self.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding,
                                                 QtWidgets.QSizePolicy.MinimumExpanding))
        pal = QtGui.QPalette()
        pal.setColor(QtGui.QPalette.Background, self.backgroundColor)
        self.setPalette(pal)
        self.setAutoFillBackground(True) 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:22,代码来源:Capacitance.py

示例2: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def __init__(self, name=""):
        super().__init__(name)
        self.leftMargin = 35
        self.chartWidth = 250
        self.chartHeight = 250
        self.fstart = 0
        self.fstop = 0
        self.minQ = 0
        self.maxQ = 0
        self.span = 0
        self.minDisplayValue = 0
        self.maxDisplayValue = 100

        self.setMinimumSize(self.chartWidth + self.rightMargin + self.leftMargin,
                            self.chartHeight + self.topMargin + self.bottomMargin)
        self.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding,
                                                 QtWidgets.QSizePolicy.MinimumExpanding))
        pal = QtGui.QPalette()
        pal.setColor(QtGui.QPalette.Background, self.backgroundColor)
        self.setPalette(pal)
        self.setAutoFillBackground(True) 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:23,代码来源:QFactor.py

示例3: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def __init__(self, name=""):
        super().__init__(name)
        self.leftMargin = 30
        self.chartWidth = 250
        self.chartHeight = 250
        self.minDisplayValue = 0
        self.maxDisplayValue = 100

        self.minValue = 0
        self.maxValue = 1
        self.span = 1

        self.setMinimumSize(self.chartWidth + self.rightMargin + self.leftMargin,
                            self.chartHeight + self.topMargin + self.bottomMargin)
        self.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding,
                                                 QtWidgets.QSizePolicy.MinimumExpanding))
        pal = QtGui.QPalette()
        pal.setColor(QtGui.QPalette.Background, self.backgroundColor)
        self.setPalette(pal)
        self.setAutoFillBackground(True) 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:22,代码来源:MagnitudeZ.py

示例4: __init__

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def __init__(self, name=""):
        super().__init__(name)
        self.leftMargin = 30
        self.chartWidth = 250
        self.chartHeight = 250
        self.minDisplayValue = -80
        self.maxDisplayValue = 10

        self.minValue = 0
        self.maxValue = 1
        self.span = 1

        self.isInverted = False

        self.setMinimumSize(self.chartWidth + self.rightMargin + self.leftMargin,
                            self.chartHeight + self.topMargin + self.bottomMargin)
        self.setSizePolicy(QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.MinimumExpanding,
                                                 QtWidgets.QSizePolicy.MinimumExpanding))
        pal = QtGui.QPalette()
        pal.setColor(QtGui.QPalette.Background, self.backgroundColor)
        self.setPalette(pal)
        self.setAutoFillBackground(True) 
开发者ID:NanoVNA-Saver,项目名称:nanovna-saver,代码行数:24,代码来源:LogMag.py

示例5: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, go2mapillaryDockWidgetBase):
        go2mapillaryDockWidgetBase.setObjectName(_fromUtf8("go2mapillaryDockWidgetBase"))
        go2mapillaryDockWidgetBase.resize(320, 260)
        self.dockWidgetContents = QtWidgets.QWidget()
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.dockWidgetContents.sizePolicy().hasHeightForWidth())
        self.dockWidgetContents.setSizePolicy(sizePolicy)
        self.dockWidgetContents.setMinimumSize(QtCore.QSize(320, 240))
        self.dockWidgetContents.setMaximumSize(QtCore.QSize(320, 240))
        self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
        self.gridLayout = QtWidgets.QGridLayout(self.dockWidgetContents)
        self.gridLayout.setMargin(0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.webView = QtWebKitWidgets.QWebView(self.dockWidgetContents)
        self.webView.setUrl(QtCore.QUrl(_fromUtf8("about:blank")))
        self.webView.setObjectName(_fromUtf8("webView"))
        self.gridLayout.addWidget(self.webView, 0, 0, 1, 1)
        go2mapillaryDockWidgetBase.setWidget(self.dockWidgetContents)

        self.retranslateUi(go2mapillaryDockWidgetBase)
        QtCore.QMetaObject.connectSlotsByName(go2mapillaryDockWidgetBase) 
开发者ID:enricofer,项目名称:go2mapillary,代码行数:26,代码来源:mapillary_explorer_dockwidget_base.py

示例6: setupUi1

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi1(self, messageformForm):
        messageformForm.setObjectName("messageformForm")
        messageformForm.resize(404, 169)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(messageformForm.sizePolicy().hasHeightForWidth())
        messageformForm.setSizePolicy(sizePolicy)
        font = QtGui.QFont()
        font.setFamily("Consolas")
        messageformForm.setFont(font)
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(":/icons/twa.gif"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        messageformForm.setWindowIcon(icon2)
        self.label = QtWidgets.QLabel(messageformForm)
        self.label.setGeometry(QtCore.QRect(40, 20, 341, 111))
        font = QtGui.QFont()
        font.setPointSize(19)
        self.label.setFont(font)
        self.label.setObjectName("label")

        self.retranslateUi(messageformForm)
        QtCore.QMetaObject.connectSlotsByName(messageformForm) 
开发者ID:techbliss,项目名称:Python_editor,代码行数:25,代码来源:pyeditor.py

示例7: initUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def initUi(self):
        self.horizontalLayout = QHBoxLayout(self)
        self.file_btn = QPushButton(QIcon(":/newPrefix/file.png"), self.text, self)
        sizePolicy = QSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)
        self.file_btn.setSizePolicy(sizePolicy)
        qss = '''QPushButton 
{
    background-color: transparent;
    border: none;
}

QPushButton:hover {
    background:transparent;
    }'''
        self.file_btn.setStyleSheet(qss)
        self.bt_close = QToolButton(self)
        self.bt_close.setIcon(QIcon(":/newPrefix/if_Delete_1493279.png"))
        self.bt_close.setAutoRaise(True)
        self.bt_close.setToolTip("Delete")
        self.bt_close.clicked.connect(lambda: self.itemOpSignal.emit(self.listwidgetItem))

        self.horizontalLayout.addWidget(self.bt_close)
        self.horizontalLayout.addWidget(self.file_btn)
        spacerItem = QtWidgets.QSpacerItem(0, 0, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem) 
开发者ID:PyQt5,项目名称:PyQt,代码行数:27,代码来源:combo_listwidget.py

示例8: _init_window

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def _init_window(self):
        # Load core stylesheet
        stylepath = os.path.join(SHAREDIR, 'pkmeter.css')
        with open(stylepath) as handle:
            self.setStyleSheet(handle.read())
        # Init self properties
        self.setWindowTitle('PKMeter Preferences')
        self.setWindowModality(Qt.ApplicationModal)
        self.setWindowIcon(QtGui.QIcon(QtGui.QPixmap('img:logo.png')))
        self.layout().setContentsMargins(10,10,10,10)
        # Init window elements
        self.manifest.tabbar.setExpanding(False)
        self.manifest.tabbar.addTab('Settings')
        self.manifest.tabbar.addTab('Data')
        self.manifest.contents.setSizePolicy(QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Expanding,
            QtWidgets.QSizePolicy.Expanding))
        self.manifest.tabbar.currentChanged.connect(self.load_tab)
        # Init the ListWidget
        listwidget = self.manifest.list
        for module in sorted(self.pkmeter.modules.values(), key=self._sortKey):
            if getattr(module, 'Plugin', None) or getattr(module, 'Config', None):
                item = QtWidgets.QListWidgetItem(utils.name(module), parent=listwidget, type=0)
                item.setData(NAMESPACE_ROLE, utils.namespace(module))
                listwidget.addItem(item)
        self.manifest.list.itemSelectionChanged.connect(self.load_tab) 
开发者ID:pkkid,项目名称:pkmeter,代码行数:28,代码来源:pkconfig.py

示例9: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, About):
        About.setObjectName("About")
        About.resize(498, 369)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(About.sizePolicy().hasHeightForWidth())
        About.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(About)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout_11 = QtWidgets.QGridLayout()
        self.gridLayout_11.setObjectName("gridLayout_11")
        self.label_6 = QtWidgets.QLabel(About)
        self.label_6.setObjectName("label_6")
        self.gridLayout_11.addWidget(self.label_6, 1, 1, 1, 1)
        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_11.addItem(spacerItem, 1, 2, 1, 1)
        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_11.addItem(spacerItem1, 1, 0, 1, 1)
        spacerItem2 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
        self.gridLayout_11.addItem(spacerItem2, 0, 1, 1, 1)
        spacerItem3 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.gridLayout_11.addItem(spacerItem3, 2, 1, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout_11)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem4 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem4)
        self.button_close = QtWidgets.QPushButton(About)
        self.button_close.setObjectName("button_close")
        self.horizontalLayout.addWidget(self.button_close)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(About)
        QtCore.QMetaObject.connectSlotsByName(About) 
开发者ID:mbusb,项目名称:multibootusb,代码行数:37,代码来源:ui_about.py

示例10: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, SpinnerWidget):
        SpinnerWidget.setObjectName("SpinnerWidget")
        SpinnerWidget.resize(306, 207)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Ignored, QtWidgets.QSizePolicy.Ignored)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(SpinnerWidget.sizePolicy().hasHeightForWidth())
        SpinnerWidget.setSizePolicy(sizePolicy)
        SpinnerWidget.setStyleSheet("QFrame { background-color: rgba(224,224,224,192)} \n"
"QLabel { background-color: transparent }")
        self.verticalLayout = QtWidgets.QVBoxLayout(SpinnerWidget)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.icon = QtWidgets.QLabel(SpinnerWidget)
        self.icon.setText("")
        self.icon.setAlignment(QtCore.Qt.AlignBottom|QtCore.Qt.AlignHCenter)
        self.icon.setObjectName("icon")
        self.verticalLayout.addWidget(self.icon)
        self.label = QtWidgets.QLabel(SpinnerWidget)
        self.label.setText("")
        self.label.setAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignTop)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.cancelButton = QtWidgets.QPushButton(SpinnerWidget)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.cancelButton.sizePolicy().hasHeightForWidth())
        self.cancelButton.setSizePolicy(sizePolicy)
        self.cancelButton.setObjectName("cancelButton")
        self.horizontalLayout.addWidget(self.cancelButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.verticalLayout.setStretch(0, 1)
        self.verticalLayout.setStretch(1, 1)

        self.retranslateUi(SpinnerWidget)
        QtCore.QMetaObject.connectSlotsByName(SpinnerWidget) 
开发者ID:iris-edu,项目名称:pyweed,代码行数:41,代码来源:SpinnerWidget.py

示例11: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(224, 117)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        self.verticalLayout = QtWidgets.QVBoxLayout(Form)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setSpacing(1)
        self.verticalLayout.setObjectName("verticalLayout")
        self.translateLabel = QtWidgets.QLabel(Form)
        self.translateLabel.setObjectName("translateLabel")
        self.verticalLayout.addWidget(self.translateLabel)
        self.rotateLabel = QtWidgets.QLabel(Form)
        self.rotateLabel.setObjectName("rotateLabel")
        self.verticalLayout.addWidget(self.rotateLabel)
        self.scaleLabel = QtWidgets.QLabel(Form)
        self.scaleLabel.setObjectName("scaleLabel")
        self.verticalLayout.addWidget(self.scaleLabel)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.mirrorImageBtn = QtWidgets.QPushButton(Form)
        self.mirrorImageBtn.setToolTip("")
        self.mirrorImageBtn.setObjectName("mirrorImageBtn")
        self.horizontalLayout.addWidget(self.mirrorImageBtn)
        self.reflectImageBtn = QtWidgets.QPushButton(Form)
        self.reflectImageBtn.setObjectName("reflectImageBtn")
        self.horizontalLayout.addWidget(self.reflectImageBtn)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:36,代码来源:TransformGuiTemplate_pyqt5.py

示例12: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, Ebeam_Table):
        Ebeam_Table.setObjectName("Ebeam_Table")
        Ebeam_Table.resize(700, 500)
        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Expanding)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Ebeam_Table.sizePolicy().hasHeightForWidth())
        Ebeam_Table.setSizePolicy(sizePolicy)
        self.gridLayout_2 = QtWidgets.QGridLayout(Ebeam_Table)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.table = QtWidgets.QTableWidget(Ebeam_Table)
        self.table.setLocale(QtCore.QLocale(QtCore.QLocale.English, QtCore.QLocale.UnitedStates))
        self.table.setEditTriggers(QtWidgets.QAbstractItemView.NoEditTriggers)
        self.table.setRowCount(0)
        self.table.setColumnCount(2)
        self.table.setObjectName("table")
        item = QtWidgets.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignCenter)
        self.table.setHorizontalHeaderItem(0, item)
        item = QtWidgets.QTableWidgetItem()
        item.setTextAlignment(QtCore.Qt.AlignCenter)
        self.table.setHorizontalHeaderItem(1, item)
        self.table.verticalHeader().setVisible(False)
        self.gridLayout_2.addWidget(self.table, 0, 1, 1, 1)

        self.retranslateUi(Ebeam_Table)
        QtCore.QMetaObject.connectSlotsByName(Ebeam_Table) 
开发者ID:ocelot-collab,项目名称:ocelot,代码行数:29,代码来源:ebeam_table_ui.py

示例13: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, WHoleMag):
        WHoleMag.setObjectName("WHoleMag")
        WHoleMag.resize(760, 490)
        WHoleMag.setMinimumSize(QtCore.QSize(760, 490))
        self.main_layout = QtWidgets.QVBoxLayout(WHoleMag)
        self.main_layout.setContentsMargins(5, 5, 5, 5)
        self.main_layout.setSpacing(4)
        self.main_layout.setObjectName("main_layout")
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.c_hole_type = QtWidgets.QComboBox(WHoleMag)
        self.c_hole_type.setObjectName("c_hole_type")
        self.c_hole_type.addItem("")
        self.c_hole_type.addItem("")
        self.c_hole_type.addItem("")
        self.c_hole_type.addItem("")
        self.c_hole_type.addItem("")
        self.c_hole_type.addItem("")
        self.c_hole_type.addItem("")
        self.horizontalLayout.addWidget(self.c_hole_type)
        spacerItem = QtWidgets.QSpacerItem(
            40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum
        )
        self.horizontalLayout.addItem(spacerItem)
        self.main_layout.addLayout(self.horizontalLayout)
        self.w_hole = QtWidgets.QWidget(WHoleMag)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Expanding
        )
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.w_hole.sizePolicy().hasHeightForWidth())
        self.w_hole.setSizePolicy(sizePolicy)
        self.w_hole.setMinimumSize(QtCore.QSize(750, 450))
        self.w_hole.setObjectName("w_hole")
        self.main_layout.addWidget(self.w_hole)

        self.retranslateUi(WHoleMag)
        QtCore.QMetaObject.connectSlotsByName(WHoleMag) 
开发者ID:Eomys,项目名称:pyleecan,代码行数:41,代码来源:Ui_WHoleMag.py

示例14: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, SPreview):
        SPreview.setObjectName("SPreview")
        SPreview.resize(532, 450)
        SPreview.setMinimumSize(QtCore.QSize(0, 0))
        self.verticalLayout = QtWidgets.QVBoxLayout(SPreview)
        self.verticalLayout.setObjectName("verticalLayout")
        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        self.w_plot = MPLCanvas2(SPreview)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred
        )
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.w_plot.sizePolicy().hasHeightForWidth())
        self.w_plot.setSizePolicy(sizePolicy)
        self.w_plot.setMinimumSize(QtCore.QSize(300, 300))
        self.w_plot.setMaximumSize(QtCore.QSize(16777215, 16777215))
        self.w_plot.setObjectName("w_plot")
        self.horizontalLayout_2.addWidget(self.w_plot)
        self.tab_machine = WMachineTable(SPreview)
        self.tab_machine.setObjectName("tab_machine")
        self.horizontalLayout_2.addWidget(self.tab_machine)
        self.verticalLayout.addLayout(self.horizontalLayout_2)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        spacerItem = QtWidgets.QSpacerItem(
            40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum
        )
        self.horizontalLayout.addItem(spacerItem)
        self.b_previous = QtWidgets.QPushButton(SPreview)
        self.b_previous.setObjectName("b_previous")
        self.horizontalLayout.addWidget(self.b_previous)
        self.b_next = QtWidgets.QPushButton(SPreview)
        self.b_next.setObjectName("b_next")
        self.horizontalLayout.addWidget(self.b_next)
        self.verticalLayout.addLayout(self.horizontalLayout)

        self.retranslateUi(SPreview)
        QtCore.QMetaObject.connectSlotsByName(SPreview) 
开发者ID:Eomys,项目名称:pyleecan,代码行数:42,代码来源:Ui_SPreview.py

示例15: setupUi

# 需要导入模块: from PyQt5 import QtWidgets [as 别名]
# 或者: from PyQt5.QtWidgets import QSizePolicy [as 别名]
def setupUi(self, WMatSelect):
        WMatSelect.setObjectName("WMatSelect")
        WMatSelect.resize(283, 30)
        sizePolicy = QtWidgets.QSizePolicy(
            QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Minimum
        )
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(WMatSelect.sizePolicy().hasHeightForWidth())
        WMatSelect.setSizePolicy(sizePolicy)
        WMatSelect.setMinimumSize(QtCore.QSize(0, 0))
        self.horizontalLayout = QtWidgets.QHBoxLayout(WMatSelect)
        self.horizontalLayout.setContentsMargins(4, 2, 4, 2)
        self.horizontalLayout.setSpacing(2)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.in_mat_type = QtWidgets.QLabel(WMatSelect)
        self.in_mat_type.setObjectName("in_mat_type")
        self.horizontalLayout.addWidget(self.in_mat_type)
        self.c_mat_type = QtWidgets.QComboBox(WMatSelect)
        self.c_mat_type.setObjectName("c_mat_type")
        self.c_mat_type.addItem("")
        self.c_mat_type.addItem("")
        self.c_mat_type.addItem("")
        self.horizontalLayout.addWidget(self.c_mat_type)
        self.b_matlib = QtWidgets.QPushButton(WMatSelect)
        self.b_matlib.setObjectName("b_matlib")
        self.horizontalLayout.addWidget(self.b_matlib)

        self.retranslateUi(WMatSelect)
        QtCore.QMetaObject.connectSlotsByName(WMatSelect)
        WMatSelect.setTabOrder(self.c_mat_type, self.b_matlib) 
开发者ID:Eomys,项目名称:pyleecan,代码行数:33,代码来源:Ui_WMatSelect.py


注:本文中的PyQt5.QtWidgets.QSizePolicy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。