本文整理汇总了Python中PySide.QtGui.QGridLayout方法的典型用法代码示例。如果您正苦于以下问题:Python QtGui.QGridLayout方法的具体用法?Python QtGui.QGridLayout怎么用?Python QtGui.QGridLayout使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PySide.QtGui
的用法示例。
在下文中一共展示了QtGui.QGridLayout方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: setupUi
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(400, 300)
self.gridLayout = QtGui.QGridLayout(Form)
self.gridLayout.setObjectName("gridLayout")
self.sizeSpin = QtGui.QSpinBox(Form)
self.sizeSpin.setProperty("value", 10)
self.sizeSpin.setObjectName("sizeSpin")
self.gridLayout.addWidget(self.sizeSpin, 1, 1, 1, 1)
self.pixelModeCheck = QtGui.QCheckBox(Form)
self.pixelModeCheck.setObjectName("pixelModeCheck")
self.gridLayout.addWidget(self.pixelModeCheck, 1, 3, 1, 1)
self.label = QtGui.QLabel(Form)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
self.plot = PlotWidget(Form)
self.plot.setObjectName("plot")
self.gridLayout.addWidget(self.plot, 0, 0, 1, 4)
self.randCheck = QtGui.QCheckBox(Form)
self.randCheck.setObjectName("randCheck")
self.gridLayout.addWidget(self.randCheck, 1, 2, 1, 1)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
示例2: initUI
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def initUI(self):
self.resize(400,100)
self.setWindowTitle('select a shape to be imported')
self.mainLayout = QtGui.QGridLayout() # a VBoxLayout for the whole form
self.shapeCombo = QtGui.QComboBox(self)
l = sorted(self.labelList)
self.shapeCombo.addItems(l)
self.buttons = QtGui.QDialogButtonBox(self)
self.buttons.setOrientation(QtCore.Qt.Horizontal)
self.buttons.addButton("Cancel", QtGui.QDialogButtonBox.RejectRole)
self.buttons.addButton("Choose", QtGui.QDialogButtonBox.AcceptRole)
self.connect(self.buttons, QtCore.SIGNAL("accepted()"), self, QtCore.SLOT("accept()"))
self.connect(self.buttons, QtCore.SIGNAL("rejected()"), self, QtCore.SLOT("reject()"))
self.mainLayout.addWidget(self.shapeCombo,0,0,1,1)
self.mainLayout.addWidget(self.buttons,1,0,1,1)
self.setLayout(self.mainLayout)
示例3: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def __init__(self, parent=None, win=None, xrefs_list=None, method=""):
super(XrefDialog, self).__init__(parent)
if not isinstance(xrefs_list, list) or len(xrefs_list) == 0:
androconf.warning("Bad XrefDialog creation")
return
if not method:
title = "Xrefs to %s" % path.split("/")[-1]
else:
title = "Xrefs to %s -> %s" % (path.split("/")[-1], method)
self.setWindowTitle(title)
layout = QtGui.QGridLayout()
xrefwin = XrefListView(self, win=win, xrefs=xrefs_list)
layout.addWidget(xrefwin, 0, 0)
self.setLayout(layout)
示例4: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def __init__(self, parent=None):
super(Extent, self).__init__(parent)
self.xmin_lineedit = LineEdit()
self.xmax_lineedit = LineEdit()
self.ymin_lineedit = LineEdit()
self.ymax_lineedit = LineEdit()
self.zmin_lineedit = LineEdit()
self.zmax_lineedit = LineEdit()
grid = QtGui.QGridLayout()
grid.addWidget(QtGui.QLabel("xmin"), 0,0)
grid.addWidget(self.xmin_lineedit, 0,1)
grid.addWidget(QtGui.QLabel("xmax"), 0,2)
grid.addWidget(self.xmax_lineedit, 0,3)
grid.addWidget(QtGui.QLabel("ymin"), 1,0)
grid.addWidget(self.ymin_lineedit, 1,1)
grid.addWidget(QtGui.QLabel("ymax"), 1,2)
grid.addWidget(self.ymax_lineedit, 1,3)
grid.addWidget(QtGui.QLabel("zmin"), 2,0)
grid.addWidget(self.zmin_lineedit, 2,1)
grid.addWidget(QtGui.QLabel("zmax"),2,2 )
grid.addWidget(self.zmax_lineedit, 2,3)
self.setLayout(grid)
示例5: quickLayout
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [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
示例6: quickLayout
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [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
示例7: reset_ui
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def reset_ui(self):
"""
Clear Layout and call :meth:`~.Terminal.initUI` again
"""
# type: () -> None
self.layout = QtGui.QGridLayout()
self.layout.setSpacing(0)
self.layout.setContentsMargins(0,0,0,0)
self.widget.setLayout(self.layout)
self.setCentralWidget(self.widget)
self.initUI()
##########################3
# Listens & inter-object methods
示例8: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def __init__(self, pilot=None, subject_list=None, start_fn=None, create_fn=None):
"""
Args:
pilot (str): The name of the pilot this panel controls
subject_list (:py:class:`.Subject_List`): The :py:class:`.Subject_List` we control
start_fn (:py:meth:`~autopilot.core.terminal.Terminal.toggle_start`): Passed by :class:`Control_Panel`
create_fn (:py:meth:`Control_Panel.create_subject`): Passed by :class:`Control_Panel`
"""
super(Pilot_Panel, self).__init__()
self.layout = QtGui.QGridLayout()
self.layout.setContentsMargins(0,0,0,0)
self.layout.setSpacing(0)
self.setLayout(self.layout)
self.pilot = pilot
self.subject_list = subject_list
self.start_fn = start_fn
self.create_fn = create_fn
self.button = None
self.init_ui()
示例9: __init__
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def __init__(self, obj,*args):
QtGui.QWidget.__init__(self, *args)
obj.widget=self
self.setWindowFlags(QtCore.Qt.WindowStaysOnTopHint)
self.vollabel = QtGui.QLabel(obj.Object.Label)
self.pushButton02 = QtGui.QPushButton()
self.pushButton02.setText("close")
self.pushButton02.clicked.connect(self.hide)
dial = QDial()
dial.setNotchesVisible(True)
self.dial=dial
dial.setMaximum(100)
dial.valueChanged.connect(obj.dreher);
layout = QHBoxLayout()
layout = QtGui.QGridLayout()
layout.addWidget(self.vollabel, 0, 0)
layout.addWidget(self.pushButton02, 15, 0,1,4)
layout.addWidget(dial,3,0)
self.setLayout(layout)
self.setWindowTitle(obj.Object.target.Label)
示例10: setupUi
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(241, 367)
self.gridLayout = QtGui.QGridLayout(Form)
self.gridLayout.setSpacing(0)
self.gridLayout.setObjectName("gridLayout")
self.label = QtGui.QLabel(Form)
self.label.setObjectName("label")
self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
self.itemTree = QtGui.QTreeWidget(Form)
self.itemTree.setObjectName("itemTree")
self.itemTree.headerItem().setText(0, "1")
self.itemTree.header().setVisible(False)
self.gridLayout.addWidget(self.itemTree, 1, 0, 1, 3)
self.label_2 = QtGui.QLabel(Form)
self.label_2.setObjectName("label_2")
self.gridLayout.addWidget(self.label_2, 2, 0, 1, 3)
self.formatList = QtGui.QListWidget(Form)
self.formatList.setObjectName("formatList")
self.gridLayout.addWidget(self.formatList, 3, 0, 1, 3)
self.exportBtn = QtGui.QPushButton(Form)
self.exportBtn.setObjectName("exportBtn")
self.gridLayout.addWidget(self.exportBtn, 6, 1, 1, 1)
self.closeBtn = QtGui.QPushButton(Form)
self.closeBtn.setObjectName("closeBtn")
self.gridLayout.addWidget(self.closeBtn, 6, 2, 1, 1)
self.paramTree = ParameterTree(Form)
self.paramTree.setObjectName("paramTree")
self.paramTree.headerItem().setText(0, "1")
self.paramTree.header().setVisible(False)
self.gridLayout.addWidget(self.paramTree, 5, 0, 1, 3)
self.label_3 = QtGui.QLabel(Form)
self.label_3.setObjectName("label_3")
self.gridLayout.addWidget(self.label_3, 4, 0, 1, 3)
self.copyBtn = QtGui.QPushButton(Form)
self.copyBtn.setObjectName("copyBtn")
self.gridLayout.addWidget(self.copyBtn, 6, 0, 1, 1)
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
示例11: setupUi
# 需要导入模块: from PySide import QtGui [as 别名]
# 或者: from PySide.QtGui import QGridLayout [as 别名]
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(529, 329)
self.selInfoWidget = QtGui.QWidget(Form)
self.selInfoWidget.setGeometry(QtCore.QRect(260, 10, 264, 222))
self.selInfoWidget.setObjectName("selInfoWidget")
self.gridLayout = QtGui.QGridLayout(self.selInfoWidget)
self.gridLayout.setContentsMargins(0, 0, 0, 0)
self.gridLayout.setObjectName("gridLayout")
self.selDescLabel = QtGui.QLabel(self.selInfoWidget)
self.selDescLabel.setText("")
self.selDescLabel.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
self.selDescLabel.setWordWrap(True)
self.selDescLabel.setObjectName("selDescLabel")
self.gridLayout.addWidget(self.selDescLabel, 0, 0, 1, 1)
self.selNameLabel = QtGui.QLabel(self.selInfoWidget)
font = QtGui.QFont()
font.setWeight(75)
font.setBold(True)
self.selNameLabel.setFont(font)
self.selNameLabel.setText("")
self.selNameLabel.setObjectName("selNameLabel")
self.gridLayout.addWidget(self.selNameLabel, 0, 1, 1, 1)
self.selectedTree = DataTreeWidget(self.selInfoWidget)
self.selectedTree.setObjectName("selectedTree")
self.selectedTree.headerItem().setText(0, "1")
self.gridLayout.addWidget(self.selectedTree, 1, 0, 1, 2)
self.hoverText = QtGui.QTextEdit(Form)
self.hoverText.setGeometry(QtCore.QRect(0, 240, 521, 81))
self.hoverText.setObjectName("hoverText")
self.view = FlowchartGraphicsView(Form)
self.view.setGeometry(QtCore.QRect(0, 0, 256, 192))
self.view.setObjectName("view")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)