本文整理匯總了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)
示例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)
示例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)