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


Python QtGui.QTreeView方法代码示例

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


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

示例1: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeView [as 别名]
def setupUi(self, LookupValueSelector):
        LookupValueSelector.setObjectName(_fromUtf8("LookupValueSelector"))
        LookupValueSelector.resize(295, 283)
        self.verticalLayout = QtGui.QVBoxLayout(LookupValueSelector)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.notice_bar = QtGui.QVBoxLayout()
        self.notice_bar.setObjectName(_fromUtf8("notice_bar"))
        self.verticalLayout.addLayout(self.notice_bar)
        self.value_list_box = QtGui.QTreeView(LookupValueSelector)
        self.value_list_box.setEditTriggers(QtGui.QAbstractItemView.NoEditTriggers)
        self.value_list_box.setAlternatingRowColors(True)
        self.value_list_box.setRootIsDecorated(False)
        self.value_list_box.setUniformRowHeights(True)
        self.value_list_box.setObjectName(_fromUtf8("value_list_box"))
        self.verticalLayout.addWidget(self.value_list_box)
        self.buttonBox = QtGui.QDialogButtonBox(LookupValueSelector)
        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(LookupValueSelector)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("accepted()")), LookupValueSelector.accept)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), LookupValueSelector.reject)
        QtCore.QMetaObject.connectSlotsByName(LookupValueSelector) 
开发者ID:gltn,项目名称:stdm,代码行数:27,代码来源:ui_lookup_value_selector.py

示例2: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeView [as 别名]
def setupUi(self, FileBrowser):
        FileBrowser.setObjectName("FileBrowser")
        FileBrowser.resize(400, 300)
        self.verticalLayout = QtGui.QVBoxLayout(FileBrowser)
        self.verticalLayout.setObjectName("verticalLayout")
        self.splitter = QtGui.QSplitter(FileBrowser)
        self.splitter.setOrientation(QtCore.Qt.Vertical)
        self.splitter.setObjectName("splitter")
        self.treeView = QtGui.QTreeView(self.splitter)
        self.treeView.setObjectName("treeView")
        self.buttonBox = QtGui.QDialogButtonBox(self.splitter)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Cancel|QtGui.QDialogButtonBox.Ok)
        self.buttonBox.setObjectName("buttonBox")
        self.verticalLayout.addWidget(self.splitter)

        self.retranslateUi(FileBrowser)
        QtCore.QMetaObject.connectSlotsByName(FileBrowser) 
开发者ID:tuwid,项目名称:darkc0de-old-stuff,代码行数:19,代码来源:FileBrowser.py

示例3: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeView [as 别名]
def __init__(self, *args, **kwargs):
		super(Outliner, self).__init__(*args, **kwargs)

		self.resize(200,500)
		self.setObjectName("CustomOutliner")

		self.layout = QtGui.QVBoxLayout(self)
		self.layout.setMargin(2)

		self.model = QtGui.QStandardItemModel()
		self.model.setItemPrototype(DagTreeItem())

		view = QtGui.QTreeView()
		view.setModel(self.model)
		view.header().setVisible(False)
		view.setEditTriggers(view.NoEditTriggers)
		view.setSelectionMode(view.ExtendedSelection)

		self.view = view
		self.layout.addWidget(self.view)

		QtCore.QTimer.singleShot(1, self.initDisplay)

		#
		# Connections
		#
		self.view.expanded.connect(self.nodeExpanded)
		self.view.selectionModel().selectionChanged.connect(self.selectionChanged) 
开发者ID:justinfx,项目名称:tutorials,代码行数:30,代码来源:outliner.py

示例4: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeView [as 别名]
def __init__(self, parent=None):
        super(KeySensitiveListView, self).__init__(parent)
        self.setHeaderHidden(True)
        self.setEditTriggers(QtGui.QTreeView.SelectedClicked)
        # self.setRootIsDecorated(False)
        # self.setExpandsOnDoubleClick(False) 
开发者ID:Denvi,项目名称:FlatCAM,代码行数:8,代码来源:ObjectCollection.py

示例5: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeView [as 别名]
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.setWindowModality(QtCore.Qt.ApplicationModal)
        Dialog.resize(1304, 753)
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(Dialog)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.versions_treeView = QtGui.QTreeView(Dialog)
        self.versions_treeView.setObjectName(_fromUtf8("versions_treeView"))
        self.verticalLayout.addWidget(self.versions_treeView)
        self.horizontalWidget = QtGui.QWidget(Dialog)
        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
        sizePolicy.setHorizontalStretch(0)
        sizePolicy.setVerticalStretch(0)
        sizePolicy.setHeightForWidth(self.horizontalWidget.sizePolicy().hasHeightForWidth())
        self.horizontalWidget.setSizePolicy(sizePolicy)
        self.horizontalWidget.setObjectName(_fromUtf8("horizontalWidget"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.horizontalWidget)
        self.horizontalLayout.setMargin(0)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.selectNone_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.selectNone_pushButton.setObjectName(_fromUtf8("selectNone_pushButton"))
        self.horizontalLayout.addWidget(self.selectNone_pushButton)
        self.selectAll_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.selectAll_pushButton.setObjectName(_fromUtf8("selectAll_pushButton"))
        self.horizontalLayout.addWidget(self.selectAll_pushButton)
        self.update_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.update_pushButton.setObjectName(_fromUtf8("update_pushButton"))
        self.horizontalLayout.addWidget(self.update_pushButton)
        self.cancel_pushButton = QtGui.QPushButton(self.horizontalWidget)
        self.cancel_pushButton.setObjectName(_fromUtf8("cancel_pushButton"))
        self.horizontalLayout.addWidget(self.cancel_pushButton)
        self.verticalLayout.addWidget(self.horizontalWidget)

        self.retranslateUi(Dialog)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
开发者ID:eoyilmaz,项目名称:anima,代码行数:42,代码来源:version_updater_UI_pyqt4.py

示例6: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeView [as 别名]
def setupUi(self, Dialog):
        Dialog.setObjectName(_fromUtf8("Dialog"))
        Dialog.resize(404, 489)
        self.verticalLayout = QtGui.QVBoxLayout(Dialog)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.vlnotification = QtGui.QVBoxLayout()
        self.vlnotification.setObjectName(_fromUtf8("vlnotification"))
        self.verticalLayout.addLayout(self.vlnotification)
        self.label_3 = QtGui.QLabel(Dialog)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.verticalLayout.addWidget(self.label_3)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.chk_all = QtGui.QCheckBox(Dialog)
        self.chk_all.setObjectName(_fromUtf8("chk_all"))
        self.horizontalLayout.addWidget(self.chk_all)
        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout.addItem(spacerItem)
        self.btnShowOutputFolder = QtGui.QPushButton(Dialog)
        self.btnShowOutputFolder.setObjectName(_fromUtf8("btnShowOutputFolder"))
        self.horizontalLayout.addWidget(self.btnShowOutputFolder)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.trentities = QtGui.QTreeView(Dialog)
        self.trentities.setObjectName(_fromUtf8("trentities"))
        self.verticalLayout.addWidget(self.trentities)
        self.ck_social_tenure = QtGui.QCheckBox(Dialog)
        self.ck_social_tenure.setChecked(True)
        self.ck_social_tenure.setObjectName(_fromUtf8("ck_social_tenure"))
        self.verticalLayout.addWidget(self.ck_social_tenure)
        self.buttonBox = QtGui.QDialogButtonBox(Dialog)
        self.buttonBox.setOrientation(QtCore.Qt.Horizontal)
        self.buttonBox.setStandardButtons(QtGui.QDialogButtonBox.Close|QtGui.QDialogButtonBox.Save)
        self.buttonBox.setCenterButtons(False)
        self.buttonBox.setObjectName(_fromUtf8("buttonBox"))
        self.verticalLayout.addWidget(self.buttonBox)

        self.retranslateUi(Dialog)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("rejected()")), Dialog.reject)
        QtCore.QObject.connect(self.buttonBox, QtCore.SIGNAL(_fromUtf8("clicked(QAbstractButton*)")), Dialog.accept)
        QtCore.QMetaObject.connectSlotsByName(Dialog) 
开发者ID:gltn,项目名称:stdm,代码行数:42,代码来源:ui_geoodk_converter.py

示例7: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeView [as 别名]
def setupUi(self, frmAdminUnitManager):
        frmAdminUnitManager.setObjectName(_fromUtf8("frmAdminUnitManager"))
        frmAdminUnitManager.resize(464, 462)
        self.gridLayout = QtGui.QGridLayout(frmAdminUnitManager)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.vlNotification = QtGui.QVBoxLayout()
        self.vlNotification.setObjectName(_fromUtf8("vlNotification"))
        self.gridLayout.addLayout(self.vlNotification, 0, 0, 1, 2)
        self.tvAdminUnits = QtGui.QTreeView(frmAdminUnitManager)
        self.tvAdminUnits.setObjectName(_fromUtf8("tvAdminUnits"))
        self.gridLayout.addWidget(self.tvAdminUnits, 1, 0, 1, 2)
        self.btnRemove = QtGui.QPushButton(frmAdminUnitManager)
        self.btnRemove.setMinimumSize(QtCore.QSize(0, 30))
        icon = QtGui.QIcon()
        icon.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/stdm/images/icons/remove.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btnRemove.setIcon(icon)
        self.btnRemove.setObjectName(_fromUtf8("btnRemove"))
        self.gridLayout.addWidget(self.btnRemove, 2, 0, 1, 1)
        self.btnClear = QtGui.QPushButton(frmAdminUnitManager)
        self.btnClear.setMinimumSize(QtCore.QSize(0, 30))
        icon1 = QtGui.QIcon()
        icon1.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/stdm/images/icons/reset.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btnClear.setIcon(icon1)
        self.btnClear.setObjectName(_fromUtf8("btnClear"))
        self.gridLayout.addWidget(self.btnClear, 2, 1, 1, 1)
        self.gbManage = QtGui.QGroupBox(frmAdminUnitManager)
        self.gbManage.setFlat(False)
        self.gbManage.setObjectName(_fromUtf8("gbManage"))
        self.horizontalLayout = QtGui.QHBoxLayout(self.gbManage)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.label = QtGui.QLabel(self.gbManage)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout.addWidget(self.label)
        self.txtUnitName = ValidatingLineEdit(self.gbManage)
        self.txtUnitName.setMinimumSize(QtCore.QSize(0, 30))
        self.txtUnitName.setMaxLength(50)
        self.txtUnitName.setObjectName(_fromUtf8("txtUnitName"))
        self.horizontalLayout.addWidget(self.txtUnitName)
        self.label_2 = QtGui.QLabel(self.gbManage)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.horizontalLayout.addWidget(self.label_2)
        self.txtUnitCode = QtGui.QLineEdit(self.gbManage)
        self.txtUnitCode.setMinimumSize(QtCore.QSize(0, 30))
        self.txtUnitCode.setMaximumSize(QtCore.QSize(50, 16777215))
        self.txtUnitCode.setMaxLength(10)
        self.txtUnitCode.setObjectName(_fromUtf8("txtUnitCode"))
        self.horizontalLayout.addWidget(self.txtUnitCode)
        self.btnAdd = QtGui.QPushButton(self.gbManage)
        self.btnAdd.setMinimumSize(QtCore.QSize(30, 30))
        self.btnAdd.setText(_fromUtf8(""))
        icon2 = QtGui.QIcon()
        icon2.addPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/stdm/images/icons/add.png")), QtGui.QIcon.Normal, QtGui.QIcon.Off)
        self.btnAdd.setIcon(icon2)
        self.btnAdd.setObjectName(_fromUtf8("btnAdd"))
        self.horizontalLayout.addWidget(self.btnAdd)
        self.gridLayout.addWidget(self.gbManage, 3, 0, 1, 2)

        self.retranslateUi(frmAdminUnitManager)
        QtCore.QMetaObject.connectSlotsByName(frmAdminUnitManager) 
开发者ID:gltn,项目名称:stdm,代码行数:61,代码来源:ui_adminUnitManager.py


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