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


Python QtCore.QSize方法代码示例

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


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

示例1: __init__

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def __init__(self, text, icon_path=None, parent=None):

        super(ActionOptionGroupHeader, self).__init__(
            text, icon_path=icon_path, parent=parent)

        font = self._label.font()
        font.setBold(True)
        self._label.setFont(font)

        self._btn = QtGui.QPushButton('+')
        self._btn.setFixedSize(QtCore.QSize(self._size, self._size))
        self._btn.setFocusPolicy(QtCore.Qt.NoFocus)
        self._btn.setCheckable(True)

        self._layout.insertWidget(0, self._btn)
        self._btn.toggled.connect(self._toggle)

    # ------------------------------------------------------------------------- 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:20,代码来源:options.py

示例2: setupUi

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def setupUi(self, onionSkinObject_layout):
        onionSkinObject_layout.setObjectName("onionSkinObject_layout")
        onionSkinObject_layout.resize(204, 38)
        self.horizontalLayout = QtGui.QHBoxLayout(onionSkinObject_layout)
        self.horizontalLayout.setSpacing(3)
        self.horizontalLayout.setContentsMargins(4, 2, 4, 2)
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.object_label = QtGui.QLabel(onionSkinObject_layout)
        self.object_label.setObjectName("object_label")
        self.horizontalLayout.addWidget(self.object_label)
        self.object_remove_btn = QtGui.QPushButton(onionSkinObject_layout)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.object_remove_btn.sizePolicy().hasHeightForWidth())
        self.object_remove_btn.setSizePolicy(sizePolicy)
        self.object_remove_btn.setMinimumSize(QtCore.QSize(16, 16))
        self.object_remove_btn.setMaximumSize(QtCore.QSize(16, 16))
        self.object_remove_btn.setObjectName("object_remove_btn")
        self.horizontalLayout.addWidget(self.object_remove_btn)

        self.retranslateUi(onionSkinObject_layout)
        QtCore.QMetaObject.connectSlotsByName(onionSkinObject_layout) 
开发者ID:Viele,项目名称:onionSkinRenderer,代码行数:25,代码来源:onionSkinRendererObjectWidget.py

示例3: sizeHint

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def sizeHint(self):
        return QSize(self.codeEditor.lineNumberAreaWidth(),0) 
开发者ID:jmwright,项目名称:cadquery-freecad-module,代码行数:4,代码来源:CodeEditor.py

示例4: sizeHint

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def sizeHint(self):
        logging.debug("In QVTKRenderWindowInteractor::sizeHint()")
        return QtCore.QSize(400, 400) 
开发者ID:mmolero,项目名称:pcloudpy,代码行数:5,代码来源:QVTKRenderWindowInteractor.py

示例5: addRemoveButton

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def addRemoveButton(self):
        self.frame_remove_btn = QtGui.QPushButton('rm')
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.frame_remove_btn.sizePolicy().hasHeightForWidth())
        self.frame_remove_btn.setSizePolicy(sizePolicy)
        self.frame_remove_btn.setMinimumSize(QtCore.QSize(16, 16))
        self.frame_remove_btn.setMaximumSize(QtCore.QSize(16, 16))
        self.frame_widget_layout.addWidget(self.frame_remove_btn) 
开发者ID:Viele,项目名称:onionSkinRenderer,代码行数:12,代码来源:onionSkinRendererWindow.py

示例6: sizeHint

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def sizeHint(self):
        return QSize(400, 400) 
开发者ID:pyCGNS,项目名称:pyCGNS,代码行数:4,代码来源:Q7VTKRenderWindowInteractor.py

示例7: sizeHint

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def sizeHint(self):
        return _QtCore.QSize(self.SCR[0], self.SCR[1]) 
开发者ID:charles-sharman,项目名称:ccad,代码行数:4,代码来源:display.py

示例8: setupUi

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def setupUi(self, Form):
        Form.setObjectName("Form")
        Form.resize(186, 154)
        Form.setMaximumSize(QtCore.QSize(200, 16777215))
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setContentsMargins(0, 0, 0, 0)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 7, 0, 1, 2)
        self.linkCombo = QtGui.QComboBox(Form)
        self.linkCombo.setSizeAdjustPolicy(QtGui.QComboBox.AdjustToContents)
        self.linkCombo.setObjectName("linkCombo")
        self.gridLayout.addWidget(self.linkCombo, 7, 2, 1, 2)
        self.autoPercentSpin = QtGui.QSpinBox(Form)
        self.autoPercentSpin.setEnabled(True)
        self.autoPercentSpin.setMinimum(1)
        self.autoPercentSpin.setMaximum(100)
        self.autoPercentSpin.setSingleStep(1)
        self.autoPercentSpin.setProperty("value", 100)
        self.autoPercentSpin.setObjectName("autoPercentSpin")
        self.gridLayout.addWidget(self.autoPercentSpin, 2, 2, 1, 2)
        self.autoRadio = QtGui.QRadioButton(Form)
        self.autoRadio.setChecked(True)
        self.autoRadio.setObjectName("autoRadio")
        self.gridLayout.addWidget(self.autoRadio, 2, 0, 1, 2)
        self.manualRadio = QtGui.QRadioButton(Form)
        self.manualRadio.setObjectName("manualRadio")
        self.gridLayout.addWidget(self.manualRadio, 1, 0, 1, 2)
        self.minText = QtGui.QLineEdit(Form)
        self.minText.setObjectName("minText")
        self.gridLayout.addWidget(self.minText, 1, 2, 1, 1)
        self.maxText = QtGui.QLineEdit(Form)
        self.maxText.setObjectName("maxText")
        self.gridLayout.addWidget(self.maxText, 1, 3, 1, 1)
        self.invertCheck = QtGui.QCheckBox(Form)
        self.invertCheck.setObjectName("invertCheck")
        self.gridLayout.addWidget(self.invertCheck, 5, 0, 1, 4)
        self.mouseCheck = QtGui.QCheckBox(Form)
        self.mouseCheck.setChecked(True)
        self.mouseCheck.setObjectName("mouseCheck")
        self.gridLayout.addWidget(self.mouseCheck, 6, 0, 1, 4)
        self.visibleOnlyCheck = QtGui.QCheckBox(Form)
        self.visibleOnlyCheck.setObjectName("visibleOnlyCheck")
        self.gridLayout.addWidget(self.visibleOnlyCheck, 3, 2, 1, 2)
        self.autoPanCheck = QtGui.QCheckBox(Form)
        self.autoPanCheck.setObjectName("autoPanCheck")
        self.gridLayout.addWidget(self.autoPanCheck, 4, 2, 1, 2)

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

示例9: _make_frame_range_controls

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def _make_frame_range_controls(self,
        min_time, max_time, start_time, end_time):

        self._frame_start = QtGui.QSpinBox()
        self._frame_start.setMinimum(min_time)
        self._frame_start.setMaximum(max_time)
        self._frame_start.setValue(int(start_time))
        self._frame_start.setFixedWidth(50)

        frame_to = QtGui.QLabel("to")

        self._frame_end = QtGui.QSpinBox()
        self._frame_end.setMinimum(min_time)
        self._frame_end.setMaximum(max_time)
        self._frame_end.setValue(int(end_time))
        self._frame_end.setFixedWidth(50)

        frame_by = QtGui.QLabel("by")

        self._frame_step = QtGui.QSpinBox()
        self._frame_step.setValue(1)
        self._frame_step.setFixedWidth(50)

        auto_frange_layout = QtGui.QHBoxLayout()
        auto_frange_layout.setContentsMargins(0, 0, 0, 0)
        auto_frange_layout.setSpacing(4)
        auto_frange_layout.addWidget(self._frame_start)
        auto_frange_layout.addWidget(frame_to)
        auto_frange_layout.addWidget(self._frame_end)
        auto_frange_layout.addWidget(frame_by)
        auto_frange_layout.addWidget(self._frame_step)

        auto_frange = QtGui.QWidget()
        auto_frange.setLayout(auto_frange_layout)

        self._manual_frange = QtGui.QLineEdit(
            str(int(start_time)) + "-" + str(int(end_time)))
        self._manual_frange.setFixedHeight(22)

        self._frange_stack = QtGui.QStackedWidget()
        self._frange_stack.addWidget(auto_frange)
        self._frange_stack.addWidget(self._manual_frange)

        edit_icon_path = IconFactory().disk_path(
            "icon:///images/icons/edit_32x32.png")

        self._frange_btn = QtGui.QPushButton()
        self._frange_btn_size = QtCore.QSize(22, 22)
        self._frange_btn.setFlat(True)
        self._frange_btn.setCheckable(True)
        self._frange_btn.setFixedSize(self._frange_btn_size)
        self._frange_btn.setIcon(QtGui.QIcon(edit_icon_path))
        self._frange_btn.setIconSize(self._frange_btn_size)
        self._frange_btn.toggled.connect(
            lambda c: self._frange_stack.setCurrentIndex(int(c)))

    # ------------------------------------------------------------------------- 
开发者ID:Clemson-DPA,项目名称:dpa-pipe,代码行数:59,代码来源:base.py

示例10: __init__

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def __init__(self, software_data, parent):
        super(SoftwareLabel, self).__init__()
        self._data = software_data
        self.parent = parent
        self.setText(software_data['title'])
        font = self.parent.get_default_font(14)
        #font.setUnderline(True)
        self.setFont(font)
        self.setStyleSheet("QLabel {color:white; background-color:transparent; }QLabel::hover {color:rgb(220, 220, 220);}")
        #  parent.set_shadow_effect(self)
        self._showing = False
        self.description_panel = QtGui.QWidget(self.parent)
        self.description_panel.setStyleSheet("background:rgba(142, 116, 173, 100)")
        self.description_panel.setVisible(False)
        self.description_layout = QtGui.QVBoxLayout(self.description_panel)
        self.description_layout.setContentsMargins(10,0,0,10)

        self.sha256sum_layout = QtGui.QHBoxLayout()
        self.description_layout.addLayout(self.sha256sum_layout)
        self.sha256sum_edit = QtGui.QLineEdit(self.sha256sum())
        self.sha256sum_edit.setFont(self.parent.get_default_font(8))
        self.sha256sum_edit.setStyleSheet("color:white;background:rgba(142, 116, 173, 0);border: 0px;")
        self.sha256sum_edit.setAutoFillBackground(True)
        self.sha256sum_edit.setReadOnly(True)
        label = QtGui.QLabel('sha256:')
        label.setFont(self.parent.get_default_font(8))
        label.setStyleSheet("color:white;background:rgba(142, 116, 173, 0);")
        label.setAutoFillBackground(False)
        self.sha256sum_layout.addWidget(label)
        self.sha256sum_layout.addWidget(self.sha256sum_edit)
        self.sha256sum_layout.addStretch()
        self.download_layout = QtGui.QHBoxLayout()
        self.description_layout.addLayout(self.download_layout)
        self.download_button = QtGui.QPushButton(self.description_panel)
        self.download_button.setText("Download")
        self.download_button.setIcon(QtGui.QIcon(":/icons/download.png"))
        self.download_button.setFlat(True)
        self.download_button.setStyleSheet("color:white;")
        self.download_button.setFont(self.parent.get_default_font(10))
        self.download_button.setIconSize(QtCore.QSize(30,30))
        self.download_layout.addWidget(self.download_button)
        self.download_progress = QtGui.QProgressBar()
        self.download_progress.setVisible(False)
        self.download_progress.setStyleSheet("QProgressBar {\n	background-color: transparent;\n color:white;   border-radius: 1px;\n	text-align: center;\n}\n\nQProgressBar::chunk {\n    background-color:rgb(62, 63, 94);\n	border-radius: 1px;\n	width: 1px;\n}")
        #self.download_progress.setTextVisible(False)
        self.download_progress.setFormat("Downloading %p%")
        self.download_layout.addWidget(self.download_progress)
        self.download_layout.addStretch()
        self.clicked.connect(lambda: self.set_showing(not self.showing()))
        self.download_button.clicked.connect(self.download_button_clicked)
        self.current_download = None
        self.manager = QtNetwork.QNetworkAccessManager(self.parent) 
开发者ID:glamrock,项目名称:Satori,代码行数:54,代码来源:utils.py

示例11: setupUi

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def setupUi(self, Form):
        Form.setObjectName("Authenticate")
        Form.resize(220, 105)
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap("logo.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        Form.setWindowIcon(icon)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
        Form.setSizePolicy(sizePolicy)
        Form.setMinimumSize(QtCore.QSize(220, 105))
        Form.setMaximumSize(QtCore.QSize(220, 105))
        self.verticalLayout = QtGui.QVBoxLayout(Form)
        self.verticalLayout.setObjectName("verticalLayout")
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setAlignment(QtCore.Qt.AlignHCenter|QtCore.Qt.AlignTop)
        self.label_3.setWordWrap(True)
        self.label_3.setObjectName("label_3")
        self.verticalLayout.addWidget(self.label_3)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName("label")
        self.horizontalLayout.addWidget(self.label)
        self.AuthBox = QtGui.QLineEdit(Form)
        self.AuthBox.setObjectName("AuthBox")
        self.horizontalLayout.addWidget(self.AuthBox)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName("horizontalLayout_2")
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.AuthButton = QtGui.QPushButton(Form)
        self.AuthButton.setObjectName("AuthButton")
        self.horizontalLayout_2.addWidget(self.AuthButton)
        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem1)
        self.verticalLayout.addLayout(self.horizontalLayout_2)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form)

        QtCore.QObject.connect(self.AuthButton, QtCore.SIGNAL("clicked()"), self.auth) 
开发者ID:adamb70,项目名称:CSGO-Market-Float-Finder,代码行数:46,代码来源:ui.py

示例12: setupUi

# 需要导入模块: from PySide import QtCore [as 别名]
# 或者: from PySide.QtCore import QSize [as 别名]
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(209, 149)
        self.gridLayout_2 = QtGui.QGridLayout(Dialog)
        self.gridLayout_2.setObjectName("gridLayout_2")
        self.placeButton = QtGui.QPushButton(Dialog)
        self.placeButton.setObjectName("placeButton")
        self.gridLayout_2.addWidget(self.placeButton, 2, 0, 1, 1)
        self.gridLayout = QtGui.QGridLayout()
        self.gridLayout.setSizeConstraint(QtGui.QLayout.SetMaximumSize)
        self.gridLayout.setObjectName("gridLayout")
        self.label = QtGui.QLabel(Dialog)
        self.label.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.label.setObjectName("label")
        self.gridLayout.addWidget(self.label, 0, 0, 1, 1)
        self.label_2 = QtGui.QLabel(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(1)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.label_2.sizePolicy().hasHeightForWidth())
        self.label_2.setSizePolicy(sizePolicy)
        self.label_2.setMinimumSize(QtCore.QSize(61, 0))
        self.label_2.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignVCenter)
        self.label_2.setObjectName("label_2")
        self.gridLayout.addWidget(self.label_2, 1, 0, 1, 1)
        self.upperLineEdit = QtGui.QLineEdit(Dialog)
        self.upperLineEdit.setObjectName("upperLineEdit")
        self.gridLayout.addWidget(self.upperLineEdit, 0, 1, 1, 1)
        self.lowerLineEdit = QtGui.QLineEdit(Dialog)
        self.lowerLineEdit.setObjectName("lowerLineEdit")
        self.gridLayout.addWidget(self.lowerLineEdit, 1, 1, 1, 1)
        self.label_3 = QtGui.QLabel(Dialog)
        self.label_3.setObjectName("label_3")
        self.gridLayout.addWidget(self.label_3, 2, 0, 1, 1)
        self.scaleDoubleSpinBox = QtGui.QDoubleSpinBox(Dialog)
        self.scaleDoubleSpinBox.setMinimum(0.05)
        self.scaleDoubleSpinBox.setSingleStep(0.05)
        self.scaleDoubleSpinBox.setProperty("value", 0.8)
        self.scaleDoubleSpinBox.setObjectName("scaleDoubleSpinBox")
        self.gridLayout.addWidget(self.scaleDoubleSpinBox, 2, 1, 1, 1)
        self.gridLayout_2.addLayout(self.gridLayout, 1, 0, 1, 1)

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.placeButton, QtCore.SIGNAL("released()"), Dialog.accept)
        QtCore.QObject.connect(self.upperLineEdit, QtCore.SIGNAL("returnPressed()"), Dialog.accept)
        QtCore.QObject.connect(self.lowerLineEdit, QtCore.SIGNAL("returnPressed()"), Dialog.accept)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
开发者ID:hamish2014,项目名称:FreeCAD_drawing_dimensioning,代码行数:50,代码来源:toleranceDialog.py


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