本文整理汇总了Python中PySide.QtGui.QVBoxLayout方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QVBoxLayout方法的具体用法?Python QtGui.QVBoxLayout怎么用?Python QtGui.QVBoxLayout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui
的用法示例。
在下文中一共展示了QtGui.QVBoxLayout方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: sub_selection_page
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def sub_selection_page(self):
if hasattr(self, '_sub_selection_page'):
return self._sub_selection_page
page = QtGui.QWizardPage()
page.setTitle("Selection")
page.setSubTitle(
"Select the subs you'd like to import.")
self._subs_widget = SubscriptionTreeWidget(self.subs,
show_categories=self._category_lookup.keys())
self._subs_widget.setFocusPolicy(QtCore.Qt.NoFocus)
layout = QtGui.QVBoxLayout()
layout.addWidget(QtGui.QLabel('Available for import :'))
layout.addWidget(self._subs_widget)
page.setLayout(layout)
self._sub_selection_page = page
return self._sub_selection_page
# -------------------------------------------------------------------------
示例2: product_selection_page
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def product_selection_page(self):
if hasattr(self, '_product_selection_page'):
return self._product_selection_page
page = QtGui.QWizardPage()
page.setTitle("Selection")
page.setSubTitle(
"Select the products you'd like to import.")
self._product_widget = EntityTreeWidget(self.importable_products)
self._product_widget.setFocusPolicy(QtCore.Qt.NoFocus)
layout = QtGui.QVBoxLayout()
layout.addWidget(QtGui.QLabel('Available for import :'))
layout.addWidget(self.product_widget)
page.setLayout(layout)
self._product_selection_page = page
return self._product_selection_page
# -------------------------------------------------------------------------
示例3: setupUi
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def setupUi(self, DockWidget):
DockWidget.setObjectName(_fromUtf8("DockWidget"))
DockWidget.resize(400, 200)
self.dockWidgetContents = QtGui.QWidget()
self.dockWidgetContents.setObjectName(_fromUtf8("dockWidgetContents"))
self.verticalLayout = QtGui.QVBoxLayout(self.dockWidgetContents)
#self.verticalLayout.setMargin(0)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
for link in self.link_sub:
groupBox = myGrpBox(self.dockWidgetContents, link, self.obj)
self.verticalLayout.addWidget(groupBox)
self.pushButton_7 = QtGui.QPushButton(self.dockWidgetContents)
self.pushButton_7.setObjectName(_fromUtf8("pushButton_7"))
self.verticalLayout.addWidget(self.pushButton_7, 0, QtCore.Qt.AlignHCenter)
spacerItem = QtGui.QSpacerItem(20, 237, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
DockWidget.setWidget(self.dockWidgetContents)
self.retranslateUi(DockWidget)
QtCore.QMetaObject.connectSlotsByName(DockWidget)
示例4: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def __init__(self, parent=None, win=None, xrefs=None, headers=["Origin", "Method"]):
super(XrefListView, self).__init__(parent)
self.parent = parent
self.mainwin = win
self.xrefs = xrefs
self.headers = headers
self.setMinimumSize(600, 400)
self.filterPatternLineEdit = QtGui.QLineEdit()
self.filterPatternLabel = QtGui.QLabel("&Filter origin pattern:")
self.filterPatternLabel.setBuddy(self.filterPatternLineEdit)
self.filterPatternLineEdit.textChanged.connect(self.filterRegExpChanged)
self.xrefwindow = XrefValueWindow(self, win, self.xrefs, self.headers)
sourceLayout = QtGui.QVBoxLayout()
sourceLayout.addWidget(self.xrefwindow)
sourceLayout.addWidget(self.filterPatternLabel)
sourceLayout.addWidget(self.filterPatternLineEdit)
self.setLayout(sourceLayout)
示例5: fill_bridges_list
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def fill_bridges_list(self):
self.bridges_layout = QtGui.QVBoxLayout(self.bridges_scrollarea_widget_contents)
self.bridges_layout.setContentsMargins(5, 5, 5, 5)
font = self.get_default_font(8)
def bridges_factory(bridge):
edit = QtGui.QLineEdit(bridge)
edit.setFont(font)
edit.setStyleSheet("color:white;background:rgba(142, 116, 173, 100);border: 0px;border-radius: 5px;")
edit.setReadOnly(True)
return edit
with open("bridges.json", 'r') as f:
bridges_list = json.load(f)
for bridge in bridges_list:
bridge_widget = bridges_factory(bridge)
self.bridges_layout.addWidget(bridge_widget)
self.bridges_layout.addStretch()
self.software_scrollarea.setWidget(self.software_layout.widget())
示例6: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def __init__(self, parent=None, App=None):
super(IPythonConsole, self).__init__(parent)
self.App = App
self.console = EmbedIPython(App=self.App)
self.console.kernel.shell.run_cell('%pylab qt')
self.console.kernel.shell.run_cell("import numpy as np")
self.console.kernel.shell.run_cell("from matplotlib import rcParams")
self.console.kernel.shell.run_cell("rcParams['backend.qt4']='PySide'")
self.console.kernel.shell.run_cell("import matplotlib.pyplot as plt")
vbox = QtGui.QVBoxLayout()
vbox.addWidget(self.console)
b = QtGui.QWidget()
b.setLayout(vbox)
self.setCentralWidget(b)
示例7: quickLayout
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def quickLayout(self, type, ui_name=""):
the_layout = ''
if type in ("form", "QFormLayout"):
the_layout = QtWidgets.QFormLayout()
the_layout.setLabelAlignment(QtCore.Qt.AlignLeft)
the_layout.setFieldGrowthPolicy(QtWidgets.QFormLayout.AllNonFixedFieldsGrow)
elif type in ("grid", "QGridLayout"):
the_layout = QtWidgets.QGridLayout()
elif type in ("hbox", "QHBoxLayout"):
the_layout = QtWidgets.QHBoxLayout()
the_layout.setAlignment(QtCore.Qt.AlignTop)
else:
the_layout = QtWidgets.QVBoxLayout()
the_layout.setAlignment(QtCore.Qt.AlignTop)
if ui_name != "":
self.uiList[ui_name] = the_layout
return the_layout
示例8: quickMsg
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def quickMsg(self, msg, block=1):
tmpMsg = QtWidgets.QMessageBox(self) # for simple msg that no need for translation
tmpMsg.setWindowTitle("Info")
lineCnt = len(msg.split('\n'))
if lineCnt > 25:
scroll = QtWidgets.QScrollArea()
scroll.setWidgetResizable(1)
content = QtWidgets.QWidget()
scroll.setWidget(content)
layout = QtWidgets.QVBoxLayout(content)
tmpLabel = QtWidgets.QLabel(msg)
tmpLabel.setTextInteractionFlags(QtCore.Qt.TextSelectableByMouse)
layout.addWidget(tmpLabel)
tmpMsg.layout().addWidget(scroll, 0, 0, 1, tmpMsg.layout().columnCount())
tmpMsg.setStyleSheet("QScrollArea{min-width:600 px; min-height: 400px}")
else:
tmpMsg.setText(msg)
if block == 0:
tmpMsg.setWindowModality( QtCore.Qt.NonModal )
tmpMsg.addButton("OK",QtWidgets.QMessageBox.YesRole)
if block:
tmpMsg.exec_()
else:
tmpMsg.show()
示例9: quickLayout
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def quickLayout(self, type, ui_name=""):
the_layout = ''
if type in ("form", "QFormLayout"):
the_layout = QtGui.QFormLayout()
the_layout.setLabelAlignment(QtCore.Qt.AlignLeft)
the_layout.setFieldGrowthPolicy(QtGui.QFormLayout.AllNonFixedFieldsGrow)
elif type in ("grid", "QGridLayout"):
the_layout = QtGui.QGridLayout()
elif type in ("hbox", "QHBoxLayout"):
the_layout = QtGui.QHBoxLayout()
the_layout.setAlignment(QtCore.Qt.AlignTop)
else:
the_layout = QtGui.QVBoxLayout()
the_layout.setAlignment(QtCore.Qt.AlignTop)
if ui_name != "":
self.uiList[ui_name] = the_layout
return the_layout
示例10: setupUi
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def setupUi(self, Dialog):
Dialog.setObjectName("Dialog")
Dialog.resize(400, 300)
self.verticalLayout = QtGui.QVBoxLayout(Dialog)
self.verticalLayout.setObjectName("verticalLayout")
self.label = QtGui.QLabel(Dialog)
self.label.setObjectName("label")
self.verticalLayout.addWidget(self.label)
self.plainTextEdit = QtGui.QPlainTextEdit(Dialog)
self.plainTextEdit.setObjectName("plainTextEdit")
self.verticalLayout.addWidget(self.plainTextEdit)
self.buttonBox = QtGui.QDialogButtonBox(Dialog)
self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
self.buttonBox.setObjectName("buttonBox")
self.verticalLayout.addWidget(self.buttonBox)
self.retranslateUi(Dialog)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("accepted()"), Dialog.accept)
QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL("rejected()"), Dialog.reject)
QtCore.QMetaObject.connectSlotsByName(Dialog)
示例11: setupUi
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(224, 117)
sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
sizePolicy.setHorizontalStretch(0)
sizePolicy.setVerticalStretch(0)
sizePolicy.setHeightForWidth(Form.sizePolicy().hasHeightForWidth())
Form.setSizePolicy(sizePolicy)
self.verticalLayout = QtGui.QVBoxLayout(Form)
self.verticalLayout.setSpacing(1)
self.verticalLayout.setContentsMargins(0, 0, 0, 0)
self.verticalLayout.setObjectName("verticalLayout")
self.translateLabel = QtGui.QLabel(Form)
self.translateLabel.setObjectName("translateLabel")
self.verticalLayout.addWidget(self.translateLabel)
self.rotateLabel = QtGui.QLabel(Form)
self.rotateLabel.setObjectName("rotateLabel")
self.verticalLayout.addWidget(self.rotateLabel)
self.scaleLabel = QtGui.QLabel(Form)
self.scaleLabel.setObjectName("scaleLabel")
self.verticalLayout.addWidget(self.scaleLabel)
self.horizontalLayout = QtGui.QHBoxLayout()
self.horizontalLayout.setObjectName("horizontalLayout")
self.mirrorImageBtn = QtGui.QPushButton(Form)
self.mirrorImageBtn.setToolTip("")
self.mirrorImageBtn.setObjectName("mirrorImageBtn")
self.horizontalLayout.addWidget(self.mirrorImageBtn)
self.reflectImageBtn = QtGui.QPushButton(Form)
self.reflectImageBtn.setObjectName("reflectImageBtn")
self.horizontalLayout.addWidget(self.reflectImageBtn)
self.verticalLayout.addLayout(self.horizontalLayout)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
示例12: import_options_page
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def import_options_page(self):
if hasattr(self, '_import_options_page'):
return self._import_options_page
page = QtGui.QWizardPage()
page.setTitle("Options")
page.setSubTitle(
"Set the options for the products being imported.")
self._options = defaultdict(dict)
options_layout = QtGui.QVBoxLayout()
options_widget = QtGui.QWidget()
options_widget.setLayout(options_layout)
scroll_area = QtGui.QScrollArea()
scroll_area.setFocusPolicy(QtCore.Qt.NoFocus)
scroll_area.setWidgetResizable(True)
scroll_area.setWidget(options_widget)
layout = QtGui.QVBoxLayout()
layout.addWidget(scroll_area)
page.setLayout(layout)
self._import_options_page = page
return self._import_options_page
# -------------------------------------------------------------------------
示例13: import_confirm_page
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def import_confirm_page(self):
if hasattr(self, '_import_confirm_page'):
return self._import_confirm_page
layout = QtGui.QVBoxLayout()
note_lbl = QtGui.QLabel(
"Describe the work you did on the entities being exported: (required)")
self._note_edit = QtGui.QLineEdit()
self._note_edit.setFocus()
self._note_edit.textChanged.connect(
lambda t: self._check_descriptions())
layout.addWidget(note_lbl)
layout.addWidget(self._note_edit)
layout.addSpacing(5)
self._import_confirm_page = QtGui.QWizardPage()
self._import_confirm_page.setTitle("Confirm")
self._import_confirm_page.setSubTitle(
"Describe and confirm the folowing imports :")
self._import_confirm_page.setLayout(layout)
return self._import_confirm_page
# -------------------------------------------------------------------------
示例14: entity_selection_page
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def entity_selection_page(self):
if hasattr(self, '_entity_selection_page'):
return self._entity_selection_page
page = QtGui.QWizardPage()
page.setTitle("Selection")
page.setSubTitle(
"Select the entities you'd like to export to products.")
self._entity_widget = EntityTreeWidget(self.exportable_entities)
self._entity_widget.setFocusPolicy(QtCore.Qt.NoFocus)
self._published_widget = EntityTreeWidget(self.published_entities)
self._published_widget.setFocusPolicy(QtCore.Qt.NoFocus)
self._published_widget.setFixedHeight(100)
layout = QtGui.QVBoxLayout()
layout.addWidget(QtGui.QLabel('Available for export :'))
layout.addWidget(self._entity_widget)
layout.addSpacing(5)
layout.addWidget(QtGui.QLabel('Already published at this version :'))
layout.addWidget(self._published_widget)
page.setLayout(layout)
self._entity_selection_page = page
return self._entity_selection_page
# -------------------------------------------------------------------------
示例15: setupUi
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QVBoxLayout [as 别名]
def setupUi(self, Zebra):
Zebra.setObjectName(_fromUtf8("Zebra"))
Zebra.resize(241, 302)
self.verticalLayoutWidget = QtGui.QWidget(Zebra)
self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, 10, 221, 251))
self.verticalLayoutWidget.setObjectName(_fromUtf8("verticalLayoutWidget"))
self.verticalLayout = QtGui.QVBoxLayout(self.verticalLayoutWidget)
self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
self.label = QtGui.QLabel(self.verticalLayoutWidget)
self.label.setObjectName(_fromUtf8("label"))
self.verticalLayout.addWidget(self.label, QtCore.Qt.AlignHCenter)
self.horizontalSlider = QtGui.QSlider(self.verticalLayoutWidget)
self.horizontalSlider.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSlider.setObjectName(_fromUtf8("horizontalSlider"))
self.verticalLayout.addWidget(self.horizontalSlider)
self.label_2 = QtGui.QLabel(self.verticalLayoutWidget)
self.label_2.setObjectName(_fromUtf8("label_2"))
self.verticalLayout.addWidget(self.label_2, QtCore.Qt.AlignHCenter)
self.horizontalSlider_2 = QtGui.QSlider(self.verticalLayoutWidget)
self.horizontalSlider_2.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSlider_2.setObjectName(_fromUtf8("horizontalSlider_2"))
self.verticalLayout.addWidget(self.horizontalSlider_2)
self.label_3 = QtGui.QLabel(self.verticalLayoutWidget)
self.label_3.setObjectName(_fromUtf8("label_3"))
self.verticalLayout.addWidget(self.label_3, QtCore.Qt.AlignHCenter)
self.horizontalSlider_3 = QtGui.QSlider(self.verticalLayoutWidget)
self.horizontalSlider_3.setOrientation(QtCore.Qt.Horizontal)
self.horizontalSlider_3.setObjectName(_fromUtf8("horizontalSlider_3"))
self.verticalLayout.addWidget(self.horizontalSlider_3)
spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
self.verticalLayout.addItem(spacerItem)
self.pushButton = QtGui.QPushButton(self.verticalLayoutWidget)
self.pushButton.setObjectName(_fromUtf8("pushButton"))
self.verticalLayout.addWidget(self.pushButton, QtCore.Qt.AlignHCenter)
self.retranslateUi(Zebra)
# QtCore.QObject.connect(self.pushButton, QtCore.SIGNAL(_fromUtf8("released()")), Zebra.close)
# QtCore.QMetaObject.connectSlotsByName(Zebra)