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


Python QtWidgets.QVBoxLayout方法代码示例

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


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

示例1: setupUi

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def setupUi(self, QSpectrumAnalyzerSettingsHelp):
        QSpectrumAnalyzerSettingsHelp.setObjectName("QSpectrumAnalyzerSettingsHelp")
        QSpectrumAnalyzerSettingsHelp.resize(1200, 700)
        self.verticalLayout = QtWidgets.QVBoxLayout(QSpectrumAnalyzerSettingsHelp)
        self.verticalLayout.setObjectName("verticalLayout")
        self.helpTextEdit = QtWidgets.QPlainTextEdit(QSpectrumAnalyzerSettingsHelp)
        self.helpTextEdit.setUndoRedoEnabled(False)
        self.helpTextEdit.setTextInteractionFlags(QtCore.Qt.TextSelectableByKeyboard|QtCore.Qt.TextSelectableByMouse)
        self.helpTextEdit.setObjectName("helpTextEdit")
        self.verticalLayout.addWidget(self.helpTextEdit)
        self.buttonBox = QtWidgets.QDialogButtonBox(QSpectrumAnalyzerSettingsHelp)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Close)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(QSpectrumAnalyzerSettingsHelp)
        self.buttonBox.accepted.connect(QSpectrumAnalyzerSettingsHelp.accept)
        self.buttonBox.rejected.connect(QSpectrumAnalyzerSettingsHelp.reject)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerSettingsHelp)
        QSpectrumAnalyzerSettingsHelp.setTabOrder(self.helpTextEdit, self.buttonBox) 
开发者ID:xmikos,项目名称:qspectrumanalyzer,代码行数:23,代码来源:ui_qspectrumanalyzer_settings_help.py

示例2: setupUi

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def setupUi(self, Dialog):
        Dialog.setObjectName("Dialog")
        Dialog.resize(573, 391)
        self.verticalLayout = QtWidgets.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName("verticalLayout")
        self.table = QtWidgets.QTableWidget(Dialog)
        self.table.setObjectName("table")
        self.table.setColumnCount(0)
        self.table.setRowCount(0)
        self.verticalLayout.addWidget(self.table)
        self.label = QtWidgets.QLabel(Dialog)
        font = QtWidgets.QFont()
        font.setPointSize(12)
        font.setWeight(75)
        font.setItalic(False)
        font.setBold(True)
        self.label.setFont(font)
        self.label.setFrameShape(QtWidgets.QFrame.NoFrame)
        self.label.setTextFormat(QtCore.Qt.AutoText)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName("label")
        self.verticalLayout.addWidget(self.label)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
开发者ID:weijer,项目名称:NukeToolSet,代码行数:27,代码来源:shortcuts_UIs.py

示例3: __makeWidgets

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __makeWidgets(self):
        self.setMinimumWidth(450)
        self.setMinimumHeight(300)
        self.__central_widget = QtWidgets.QWidget()
        self.__central_layout = QtWidgets.QVBoxLayout()
        self.setCentralWidget(self.__central_widget)
        self.__central_widget.setLayout(self.__central_layout)

        self.__top_widget = widgets.TopBarWidget()
        self.__main_widget = widgets.MainWidget(visitorClass=self.__visitor_class)

        self.__central_layout.addWidget(self.__top_widget)
        self.__central_layout.addWidget(self.__main_widget)
        self.__central_layout.setSpacing(0)
        self.__central_layout.setContentsMargins(0, 0, 0, 0)

        self.__top_widget.setBrowserButtonEnabled(False, False)
        self.__main_widget.ConditionChanged.connect(self.__top_widget.setBrowserButtonEnabled)
        self.__main_widget.KarteChanged.connect(self.__top_widget.setCurrentKarteName)
        self.__top_widget.BackClicked.connect(self.__back)
        self.__top_widget.NextClicked.connect(self.__next)
        self.__top_widget.SelectionOnlyChanged.connect(self.__main_widget.setSelectionOnly)
        self.__top_widget.reset_button.clicked.connect(self.__main_widget.reset)
        self.__top_widget.test_button.clicked.connect(self.__main_widget.test)
        self.__main_widget.StatusChanged.connect(self.__top_widget.status_label.setStatus) 
开发者ID:sol-ansano-kim,项目名称:medic,代码行数:27,代码来源:window.py

示例4: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self, parent=None, isFloat=True, draggerSteps=FLOAT_SLIDER_DRAG_STEPS):
        super(draggers, self).__init__(parent)
        self.initialPos = None
        self.setLayout(QtWidgets.QVBoxLayout())
        self.layout().setSpacing(0)
        self.layout().setContentsMargins(0, 0, 0, 0)
        self.setWindowFlags(QtCore.Qt.Popup)
        self.activeDrag = None
        self.lastDeltaX = 0
        self.drags = []
        steps = copy(draggerSteps)
        if not isFloat:
            # if int, cut steps less than 1.0
            steps = list(filter(lambda x: abs(x) >= 1.0, steps))
        for i in steps:
            drag = inputDragger(self, i)
            self.drags.append(drag)
            self.layout().addWidget(drag)
        self.installEventFilter(self) 
开发者ID:wonderworks-software,项目名称:PyFlow,代码行数:21,代码来源:QtSliders.py

示例5: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self, font, textColor, parent=None):
        super(TextEditDialog, self).__init__(parent)
        self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
        self.resize(QtCore.QSize(400, 300))
        self.layout = QVBoxLayout(self)
        self.layout.setContentsMargins(2, 2, 2, 2)
        self.te = TextEditingField()
        self.te.accepted.connect(self.onAccept)
        self._font = QtGui.QFont(font)
        self.te.setTextColor(textColor)
        self.layout.addWidget(self.te)
        self.buttons = QDialogButtonBox(
            QDialogButtonBox.Ok | QDialogButtonBox.Cancel, self)
        self.buttons.accepted.connect(self.onAccept)
        self.buttons.rejected.connect(self.onReject)
        self.layout.addWidget(self.buttons)
        self._result = None 
开发者ID:wonderworks-software,项目名称:PyFlow,代码行数:19,代码来源:TextEditDialog.py

示例6: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self,name):
        super(CollapSibleGoupBox, self).__init__()

        # widgets
        self.controlGroup = QtWidgets.QGroupBox()
        self.controlGroup.setTitle(name)
        self.controlGroup.setCheckable(True)
        self.controlGroup.setChecked(True)

        # groupbox layout
        self.groupLayout = QtWidgets.QVBoxLayout(self.controlGroup)

        self.controlGroup.setFixedHeight(self.controlGroup.sizeHint().height())

        # signals
        self.controlGroup.toggled.connect(
            lambda: self.toggleCollapsed())

        # layout
        self.mainLayout = QtWidgets.QGridLayout(self)
        self.mainLayout.addWidget(self.controlGroup) 
开发者ID:wonderworks-software,项目名称:PyFlow,代码行数:23,代码来源:PropertiesFramework.py

示例7: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self, parent=None,validPins=None):
        super(SelectPinDialog, self).__init__(None)
        self.setWindowFlags(QtCore.Qt.Window | QtCore.Qt.FramelessWindowHint)
        self.setWindowTitle("Select pin")
        self.setWindowIcon(QtGui.QIcon(":/pin.png"))
        self.resize(QtCore.QSize(400, 300))

        self.mainLayout = QtWidgets.QVBoxLayout(self)
        self.mainLayout.setContentsMargins(2, 2, 2, 2)
        self.searchBox = QtWidgets.QLineEdit()
        self.searchBox.setPlaceholderText("search...")
        self.searchBox.textChanged.connect(self.filterContent)
        self.mainLayout.addWidget(self.searchBox)
        if not validPins:
            validPins = [pin.__name__ for pin in getAllPinClasses()]
        self.content = _PinsListWidget(validPins=validPins)
        self.mainLayout.addWidget(self.content)
        self.content.itemClicked.connect(self.onItemClicked)
        self.content.returnPressed.connect(self.onReturnPressed)

        self._result = None 
开发者ID:wonderworks-software,项目名称:PyFlow,代码行数:23,代码来源:SelectPinDialog.py

示例8: setupUi

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def setupUi(self, QSpectrumAnalyzerPersistence):
        QSpectrumAnalyzerPersistence.setObjectName("QSpectrumAnalyzerPersistence")
        QSpectrumAnalyzerPersistence.resize(250, 130)
        self.verticalLayout = QtWidgets.QVBoxLayout(QSpectrumAnalyzerPersistence)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label_2 = QtWidgets.QLabel(QSpectrumAnalyzerPersistence)
        self.label_2.setObjectName("label_2")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label_2)
        self.decayFunctionComboBox = QtWidgets.QComboBox(QSpectrumAnalyzerPersistence)
        self.decayFunctionComboBox.setObjectName("decayFunctionComboBox")
        self.decayFunctionComboBox.addItem("")
        self.decayFunctionComboBox.addItem("")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.decayFunctionComboBox)
        self.label = QtWidgets.QLabel(QSpectrumAnalyzerPersistence)
        self.label.setObjectName("label")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.label)
        self.persistenceLengthSpinBox = QtWidgets.QSpinBox(QSpectrumAnalyzerPersistence)
        self.persistenceLengthSpinBox.setProperty("value", 5)
        self.persistenceLengthSpinBox.setObjectName("persistenceLengthSpinBox")
        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.persistenceLengthSpinBox)
        self.verticalLayout.addLayout(self.formLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 5, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(QSpectrumAnalyzerPersistence)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.label_2.setBuddy(self.decayFunctionComboBox)
        self.label.setBuddy(self.persistenceLengthSpinBox)

        self.retranslateUi(QSpectrumAnalyzerPersistence)
        self.decayFunctionComboBox.setCurrentIndex(1)
        self.buttonBox.accepted.connect(QSpectrumAnalyzerPersistence.accept)
        self.buttonBox.rejected.connect(QSpectrumAnalyzerPersistence.reject)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerPersistence)
        QSpectrumAnalyzerPersistence.setTabOrder(self.decayFunctionComboBox, self.persistenceLengthSpinBox)
        QSpectrumAnalyzerPersistence.setTabOrder(self.persistenceLengthSpinBox, self.buttonBox) 
开发者ID:xmikos,项目名称:qspectrumanalyzer,代码行数:42,代码来源:ui_qspectrumanalyzer_persistence.py

示例9: setupUi

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def setupUi(self, QSpectrumAnalyzerBaseline):
        QSpectrumAnalyzerBaseline.setObjectName("QSpectrumAnalyzerBaseline")
        QSpectrumAnalyzerBaseline.resize(500, 100)
        self.verticalLayout = QtWidgets.QVBoxLayout(QSpectrumAnalyzerBaseline)
        self.verticalLayout.setObjectName("verticalLayout")
        self.formLayout = QtWidgets.QFormLayout()
        self.formLayout.setObjectName("formLayout")
        self.label = QtWidgets.QLabel(QSpectrumAnalyzerBaseline)
        self.label.setObjectName("label")
        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.label)
        self.horizontalLayout = QtWidgets.QHBoxLayout()
        self.horizontalLayout.setObjectName("horizontalLayout")
        self.baselineFileEdit = QtWidgets.QLineEdit(QSpectrumAnalyzerBaseline)
        self.baselineFileEdit.setObjectName("baselineFileEdit")
        self.horizontalLayout.addWidget(self.baselineFileEdit)
        self.baselineFileButton = QtWidgets.QToolButton(QSpectrumAnalyzerBaseline)
        self.baselineFileButton.setMinimumSize(QtCore.QSize(50, 0))
        self.baselineFileButton.setObjectName("baselineFileButton")
        self.horizontalLayout.addWidget(self.baselineFileButton)
        self.formLayout.setLayout(0, QtWidgets.QFormLayout.FieldRole, self.horizontalLayout)
        self.verticalLayout.addLayout(self.formLayout)
        spacerItem = QtWidgets.QSpacerItem(20, 1, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
        self.verticalLayout.addItem(spacerItem)
        self.buttonBox = QtWidgets.QDialogButtonBox(QSpectrumAnalyzerBaseline)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtWidgets.QDialogButtonBox.Cancel|QtWidgets.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.buttonBox)
        self.label.setBuddy(self.baselineFileEdit)

        self.retranslateUi(QSpectrumAnalyzerBaseline)
        self.buttonBox.accepted.connect(QSpectrumAnalyzerBaseline.accept)
        self.buttonBox.rejected.connect(QSpectrumAnalyzerBaseline.reject)
        QtCore.QMetaObject.connectSlotsByName(QSpectrumAnalyzerBaseline)
        QSpectrumAnalyzerBaseline.setTabOrder(self.baselineFileEdit, self.baselineFileButton) 
开发者ID:xmikos,项目名称:qspectrumanalyzer,代码行数:37,代码来源:ui_qspectrumanalyzer_baseline.py

示例10: setupUi

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def setupUi(self, findReplace):
        findReplace.setObjectName("findReplace")
        findReplace.resize(246, 101)
        self.verticalLayout = QtWidgets.QVBoxLayout(findReplace)
        self.verticalLayout.setObjectName("verticalLayout")
        self.gridLayout = QtWidgets.QGridLayout()
        self.gridLayout.setObjectName("gridLayout")
        self.replace_le = QtWidgets.QLineEdit(findReplace)
        self.replace_le.setObjectName("replace_le")
        self.gridLayout.addWidget(self.replace_le, 1, 0, 1, 1)
        self.find_le = QtWidgets.QLineEdit(findReplace)
        self.find_le.setObjectName("find_le")
        self.gridLayout.addWidget(self.find_le, 0, 0, 1, 1)
        self.find_btn = QtWidgets.QPushButton(findReplace)
        self.find_btn.setObjectName("find_btn")
        self.gridLayout.addWidget(self.find_btn, 0, 1, 1, 1)
        self.replace_btn = QtWidgets.QPushButton(findReplace)
        self.replace_btn.setObjectName("replace_btn")
        self.gridLayout.addWidget(self.replace_btn, 1, 1, 1, 1)
        self.replaceAll_btn = QtWidgets.QPushButton(findReplace)
        self.replaceAll_btn.setObjectName("replaceAll_btn")
        self.gridLayout.addWidget(self.replaceAll_btn, 2, 1, 1, 1)
        self.verticalLayout.addLayout(self.gridLayout)

        self.retranslateUi(findReplace)
        QtCore.QMetaObject.connectSlotsByName(findReplace)
        findReplace.setTabOrder(self.find_le, self.replace_le)
        findReplace.setTabOrder(self.replace_le, self.find_btn)
        findReplace.setTabOrder(self.find_btn, self.replace_btn)
        findReplace.setTabOrder(self.replace_btn, self.replaceAll_btn) 
开发者ID:weijer,项目名称:NukeToolSet,代码行数:32,代码来源:findWidget_UIs.py

示例11: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self, parent=None):
        super(ReplacePath, self).__init__(parent)
        self.resize(500, 100)
        self.setWindowTitle('Replace Read Node Path')
        self.setWindowFlags(QtCore.Qt.Dialog | QtCore.Qt.WindowCloseButtonHint | QtCore.Qt.WindowMinimizeButtonHint)
        main_layout = QtGui.QVBoxLayout(self)
        main_layout.setSpacing(15)

        source_label = QtGui.QLabel('Source Path')
        self.source_le = QtGui.QLineEdit()
        target_label = QtGui.QLabel('Target Path')
        self.target_le = QtGui.QLineEdit()
        self.replace_btn = QtGui.QPushButton('Replace')
        self.replace_btn.clicked.connect(self.do_replace)

        source_layout = QtGui.QHBoxLayout()
        source_layout.addWidget(source_label)
        source_layout.addWidget(self.source_le)

        target_layout = QtGui.QHBoxLayout()
        target_layout.addWidget(target_label)
        target_layout.addWidget(self.target_le)

        main_layout.addLayout(source_layout)
        main_layout.addLayout(target_layout)
        main_layout.addWidget(self.replace_btn) 
开发者ID:weijer,项目名称:NukeToolSet,代码行数:28,代码来源:replace_read_node_path.py

示例12: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self):
        super(PackageDialog, self).__init__()

        main_layout = QtGui.QVBoxLayout(self)
        self.mainWidget = QtCompat.load_ui(ui_path)
        self.setWindowTitle(self.mainWidget.windowTitle())
        main_layout.addWidget(self.mainWidget)

        self.mainWidget.FileButton.clicked.connect(self.on_FileButton_clicked)
        self.mainWidget.packButton.clicked.connect(self.on_packButton_clicked)
        self.mainWidget.cancelButton.clicked.connect(self.close) 
开发者ID:weijer,项目名称:NukeToolSet,代码行数:13,代码来源:nuke2pack.py

示例13: __makeWidgets

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __makeWidgets(self):
        main_layout = QtWidgets.QVBoxLayout()
        main_layout.setContentsMargins(0, 0, 0, 0)
        self.setLayout(main_layout)

        horizon_layout = QtWidgets.QHBoxLayout()
        horizon_layout.setSpacing(10)
        horizon_layout.setContentsMargins(0, 0, 0, 0)
        self.__browser_button_widget = BrowserButtonWidget()
        self.reset_button = QtWidgets.QPushButton()
        self.test_button = QtWidgets.QPushButton()
        self.selection_only_check = QtWidgets.QCheckBox()
        self.reset_button.setObjectName("reset_button")
        self.test_button.setObjectName("test_button")
        self.selection_only_check.setObjectName("selection_check")
        self.status_label = StatusLabel()
        self.__current_karte_label = CurrentKarteLabel()

        self.__phase_items[1] = [self.reset_button, self.test_button, self.selection_only_check, self.status_label]
        
        horizon_layout.addWidget(self.__browser_button_widget)
        horizon_layout.addSpacing(20)
        horizon_layout.addWidget(self.reset_button)
        horizon_layout.addWidget(self.test_button)
        horizon_layout.addWidget(self.selection_only_check)
        horizon_layout.addWidget(self.status_label)
        horizon_layout.addStretch(9999)
        horizon_layout.addWidget(self.__current_karte_label)

        main_layout.addLayout(horizon_layout)

        self.__browser_button_widget.BackClicked.connect(self.BackClicked.emit)
        self.__browser_button_widget.NextClicked.connect(self.NextClicked.emit)
        self.selection_only_check.stateChanged.connect(self.__selectionOnlyChanged) 
开发者ID:sol-ansano-kim,项目名称:medic,代码行数:36,代码来源:widgets.py

示例14: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self):
        super(VariablesTool, self).__init__()
        self.setMinimumSize(QtCore.QSize(200, 50))
        self.varsWidget = None
        self.content = QWidget()
        self.content.setObjectName("VariablesToolContent")
        self.verticalLayout = QVBoxLayout(self.content)
        self.verticalLayout.setSpacing(0)
        self.verticalLayout.setContentsMargins(0, 0, 0, 0)
        self.verticalLayout.setObjectName("verticalLayout")
        self.setWidget(self.content) 
开发者ID:wonderworks-software,项目名称:PyFlow,代码行数:13,代码来源:VariablesTool.py

示例15: __init__

# 需要导入模块: from Qt import QtWidgets [as 别名]
# 或者: from Qt.QtWidgets import QVBoxLayout [as 别名]
def __init__(self, dock=False):
        # First lets delete a dock if we have one so that we aren't creating more than we neec
        deleteDock()
        # Then if we have a UI called lightingManager, we'll delete it so that we can only have one instance of this
        # A try except is a very important part of programming when we don't want an error to stop our code
        # We first try to do something and if we fail, then we do something else.
        try:
            pm.deleteUI('lightingManager')
        except:
            logger.debug('No previous UI exists')
        # <=Maya2016: For Maya 2016 and below we always put it inside a QDialog and only dock at the end of this __init__
        # Then we create a new dialog and give it the main maya window as its parent
        # we also store it as the parent for our current UI to be put inside
        parent = QtWidgets.QDialog(parent=getMayaMainWindow())
        # We set its name so that we can find and delete it later
        # <=Maya2016: This also lets us attach the light manager to our dock control
        parent.setObjectName('lightingManager')
        # Then we set the title
        parent.setWindowTitle('Lighting Manager')

        # Finally we give it a layout
        dlgLayout = QtWidgets.QVBoxLayout(parent)

        # Now we are on to our actual widget
        # We've figured out our parent, so lets send that to the QWidgets initialization method
        super(LightingManager, self).__init__(parent=parent)

        # We call our buildUI method to construct our UI
        self.buildUI()

        # Now we can tell it to populate with widgets for every light
        self.populate()

        # We then add ourself to our parents layout
        self.parent().layout().addWidget(self)
        # Finally if we're not docked, then we show our parent
        parent.show()

        # <=Maya2016: For Maya 2016 and below we need to create the dock after we create our widget's parent window
        if dock:
            getDock() 
开发者ID:dgovil,项目名称:PythonForMayaSamples,代码行数:43,代码来源:lightManager2016Below.py


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