當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。