Python PySide.QtCore.QSize() Examples
The following are 15
code examples of PySide.QtCore.QSize().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
PySide.QtCore
, or try the search function
.
Example #1
Source File: options.py From dpa-pipe with MIT License | 6 votes |
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) # -------------------------------------------------------------------------
Example #2
Source File: CodeEditor.py From cadquery-freecad-module with GNU Lesser General Public License v3.0 | 5 votes |
def sizeHint(self): return QSize(self.codeEditor.lineNumberAreaWidth(),0)
Example #3
Source File: QVTKRenderWindowInteractor.py From pcloudpy with BSD 3-Clause "New" or "Revised" License | 5 votes |
def sizeHint(self): logging.debug("In QVTKRenderWindowInteractor::sizeHint()") return QtCore.QSize(400, 400)
Example #4
Source File: onionSkinRendererObjectWidget.py From onionSkinRenderer with MIT License | 5 votes |
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)
Example #5
Source File: Q7VTKRenderWindowInteractor.py From pyCGNS with GNU Lesser General Public License v2.1 | 5 votes |
def sizeHint(self): return QSize(400, 400)
Example #6
Source File: QVTKRenderWindowInteractor.py From pyCGNS with GNU Lesser General Public License v2.1 | 5 votes |
def sizeHint(self): return QSize(400, 400)
Example #7
Source File: display.py From ccad with GNU Lesser General Public License v3.0 | 5 votes |
def sizeHint(self): return _QtCore.QSize(self.SCR[0], self.SCR[1])
Example #8
Source File: axisCtrlTemplate_pyside.py From tf-pose with Apache License 2.0 | 4 votes |
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)
Example #9
Source File: base.py From dpa-pipe with MIT License | 4 votes |
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))) # -------------------------------------------------------------------------
Example #10
Source File: utils.py From Satori with Artistic License 2.0 | 4 votes |
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)
Example #11
Source File: onionSkinRendererWindow.py From onionSkinRenderer with MIT License | 4 votes |
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)
Example #12
Source File: ui.py From CSGO-Market-Float-Finder with MIT License | 4 votes |
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)
Example #13
Source File: toleranceDialog.py From FreeCAD_drawing_dimensioning with GNU Lesser General Public License v2.1 | 4 votes |
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)
Example #14
Source File: axisCtrlTemplate_pyside.py From soapy with GNU General Public License v3.0 | 4 votes |
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)
Example #15
Source File: axisCtrlTemplate_pyside.py From qgisSpaceSyntaxToolkit with GNU General Public License v3.0 | 4 votes |
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)