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


Python QtGui.QListView方法代码示例

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


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

示例1: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QListView [as 别名]
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(478, 280)
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.listView = QtGui.QListView(Dialog)
        self.listView.setObjectName(_fromUtf8("listView"))
        self.horizontalLayout.addWidget(self.listView)
        self.verticalLayout_2 = QtGui.QVBoxLayout()
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem)
        self.pushButton_2 = QtGui.QPushButton(Dialog)
        self.pushButton_2.setObjectName(_fromUtf8("pushButton_2"))
        self.verticalLayout_2.addWidget(self.pushButton_2)
        self.pushButton = QtGui.QPushButton(Dialog)
        self.pushButton.setObjectName(_fromUtf8("pushButton"))
        self.verticalLayout_2.addWidget(self.pushButton)
        spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
        self.verticalLayout_2.addItem(spacerItem1)
        self.horizontalLayout.addLayout(self.verticalLayout_2)
        self.listView_2 = QtGui.QListView(Dialog)
        self.listView_2.setObjectName(_fromUtf8("listView_2"))
        self.horizontalLayout.addWidget(self.listView_2)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), Dialog.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
开发者ID:eoyilmaz,项目名称:anima,代码行数:39,代码来源:choose_from_list_dialog_UI_pyqt4.py

示例2: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QListView [as 别名]
def setupUi(self, frmContentAuth):
        frmContentAuth.setObjectName(_fromUtf8("frmContentAuth"))
        frmContentAuth.resize(501, 382)
        self.gridLayout = QtGui.QGridLayout(frmContentAuth)
        self.gridLayout.setContentsMargins(10, 12, 10, 10)
        self.gridLayout.setHorizontalSpacing(12)
        self.gridLayout.setVerticalSpacing(10)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(frmContentAuth)
        self.label.setWordWrap(True)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 2)
        self.lstContent = QtGui.QListView(frmContentAuth)
        self.lstContent.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.lstContent.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        self.lstContent.setObjectName(_fromUtf8("lstContent"))
        self.gridLayout.addWidget(self.lstContent, 1, 0, 1, 1)
        self.lstRoles = QtGui.QListView(frmContentAuth)
        self.lstRoles.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.lstRoles.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        self.lstRoles.setObjectName(_fromUtf8("lstRoles"))
        self.gridLayout.addWidget(self.lstRoles, 1, 1, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(frmContentAuth)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 2, 0, 1, 2)

        self.retranslateUi(frmContentAuth)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), frmContentAuth.reject)
        QtCore.QMetaObject.connectSlotsByName(frmContentAuth) 
开发者ID:gltn,项目名称:stdm,代码行数:33,代码来源:ui_content_auth.py

示例3: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QListView [as 别名]
def setupUi(self, frmDocumentSelector):
        frmDocumentSelector.setObjectName(_fromUtf8("frmDocumentSelector"))
        frmDocumentSelector.resize(323, 234)
        self.gridLayout = QtGui.QGridLayout(frmDocumentSelector)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.lstDocs = QtGui.QListView(frmDocumentSelector)
        self.lstDocs.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.lstDocs.setSelectionBehavior(QtGui.QAbstractItemView.SelectRows)
        self.lstDocs.setObjectName(_fromUtf8("lstDocs"))
        self.gridLayout.addWidget(self.lstDocs, 2, 0, 1, 1)
        self.label = QtGui.QLabel(frmDocumentSelector)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 1, 0, 1, 1)
        self.manageButtonBox = QtGui.QDialogButtonBox(frmDocumentSelector)
        self.manageButtonBox.setOrientation(QtCore.Qt.Vertical)
        self.manageButtonBox.setStandardButtons(QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Ok|QtGui.QDialogButtonBox.Save)
        self.manageButtonBox.setObjectName(_fromUtf8("manageButtonBox"))
        self.gridLayout.addWidget(self.manageButtonBox, 2, 1, 1, 1)
        self.buttonBox = QtGui.QDialogButtonBox(frmDocumentSelector)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setCenterButtons(True)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.gridLayout.addWidget(self.buttonBox, 3, 0, 1, 2)
        self.vlNotification = QtGui.QVBoxLayout()
        self.vlNotification.setObjectName(_fromUtf8("vlNotification"))
        self.gridLayout.addLayout(self.vlNotification, 0, 0, 1, 2)

        self.retranslateUi(frmDocumentSelector)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), frmDocumentSelector.reject)
        QtCore.QObject.connect(self.manageButtonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), frmDocumentSelector.reject)
        QtCore.QMetaObject.connectSlotsByName(frmDocumentSelector) 
开发者ID:gltn,项目名称:stdm,代码行数:34,代码来源:ui_composer_doc_selector.py


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