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


Python QtGui.QTreeWidget方法代码示例

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


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

示例1: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def setupUi(self, Form):
        Form.setObjectName(_fromUtf8("Form"))
        Form.resize(241, 367)
        self.gridLayout = QtGui.QGridLayout(Form)
        self.gridLayout.setSpacing(0)
        self.gridLayout.setObjectName(_fromUtf8("gridLayout"))
        self.label = QtGui.QLabel(Form)
        self.label.setObjectName(_fromUtf8("label"))
        self.gridLayout.addWidget(self.label, 0, 0, 1, 3)
        self.itemTree = QtGui.QTreeWidget(Form)
        self.itemTree.setObjectName(_fromUtf8("itemTree"))
        self.itemTree.headerItem().setText(0, _fromUtf8("1"))
        self.itemTree.header().setVisible(False)
        self.gridLayout.addWidget(self.itemTree, 1, 0, 1, 3)
        self.label_2 = QtGui.QLabel(Form)
        self.label_2.setObjectName(_fromUtf8("label_2"))
        self.gridLayout.addWidget(self.label_2, 2, 0, 1, 3)
        self.formatList = QtGui.QListWidget(Form)
        self.formatList.setObjectName(_fromUtf8("formatList"))
        self.gridLayout.addWidget(self.formatList, 3, 0, 1, 3)
        self.exportBtn = QtGui.QPushButton(Form)
        self.exportBtn.setObjectName(_fromUtf8("exportBtn"))
        self.gridLayout.addWidget(self.exportBtn, 6, 1, 1, 1)
        self.closeBtn = QtGui.QPushButton(Form)
        self.closeBtn.setObjectName(_fromUtf8("closeBtn"))
        self.gridLayout.addWidget(self.closeBtn, 6, 2, 1, 1)
        self.paramTree = ParameterTree(Form)
        self.paramTree.setObjectName(_fromUtf8("paramTree"))
        self.paramTree.headerItem().setText(0, _fromUtf8("1"))
        self.paramTree.header().setVisible(False)
        self.gridLayout.addWidget(self.paramTree, 5, 0, 1, 3)
        self.label_3 = QtGui.QLabel(Form)
        self.label_3.setObjectName(_fromUtf8("label_3"))
        self.gridLayout.addWidget(self.label_3, 4, 0, 1, 3)
        self.copyBtn = QtGui.QPushButton(Form)
        self.copyBtn.setObjectName(_fromUtf8("copyBtn"))
        self.gridLayout.addWidget(self.copyBtn, 6, 0, 1, 1)

        self.retranslateUi(Form)
        QtCore.QMetaObject.connectSlotsByName(Form) 
开发者ID:SrikanthVelpuri,项目名称:tf-pose,代码行数:42,代码来源:exportDialogTemplate_pyqt.py

示例2: findTreeItem

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def findTreeItem(parentItem, findItemName):
    if type(parentItem) == QtGui.QTreeWidget:
        for item in parentItem.findItems("", QtCore.Qt.MatchExactly):
            if item.text(0) == findItemName:
                return item
    elif type(parentItem) == QtGui.QTreeWidgetItem:
        for i in range(parentItem.childCount()):
            item = parentItem.child(i)
            if item.text(0) == findItemName:
                return item
    return None 
开发者ID:ubuntunux,项目名称:PyEngine3D,代码行数:13,代码来源:MainWindow.py

示例3: setLang

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def setLang(self, langName):
        lang_data = self.memoData['lang'][langName]
        for ui_name in lang_data.keys():
            if ui_name in self.uiList.keys() and lang_data[ui_name] != '':
                ui_element = self.uiList[ui_name]
                # '' means no translation availdanle in that data file
                if isinstance(ui_element, (QtWidgets.QLabel, QtWidgets.QPushButton, QtWidgets.QAction, QtWidgets.QCheckBox) ):
                    # uiType: QLabel, QPushButton, QAction(menuItem), QCheckBox
                    ui_element.setText(lang_data[ui_name])
                elif isinstance(ui_element, (QtWidgets.QGroupBox, QtWidgets.QMenu) ):
                    # uiType: QMenu, QGroupBox
                    ui_element.setTitle(lang_data[ui_name])
                elif isinstance(ui_element, QtWidgets.QTabWidget):
                    # uiType: QTabWidget
                    tabCnt = ui_element.count()
                    tabNameList = lang_data[ui_name].split(';')
                    if len(tabNameList) == tabCnt:
                        for i in range(tabCnt):
                            if tabNameList[i] != '':
                                ui_element.setTabText(i,tabNameList[i])
                elif isinstance(ui_element, QtWidgets.QComboBox):
                    # uiType: QComboBox
                    itemCnt = ui_element.count()
                    itemNameList = lang_data[ui_name].split(';')
                    ui_element.clear()
                    ui_element.addItems(itemNameList)
                elif isinstance(ui_element, QtWidgets.QTreeWidget):
                    # uiType: QTreeWidget
                    labelCnt = ui_element.headerItem().columnCount()
                    labelList = lang_data[ui_name].split(';')
                    ui_element.setHeaderLabels(labelList)
                elif isinstance(ui_element, QtWidgets.QTableWidget):
                    # uiType: QTableWidget
                    colCnt = ui_element.columnCount()
                    headerList = lang_data[ui_name].split(';')
                    cur_table.setHorizontalHeaderLabels( headerList )
                elif isinstance(ui_element, (str, unicode) ):
                    # uiType: string for msg
                    self.uiList[ui_name] = lang_data[ui_name] 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:41,代码来源:universal_tool_template_1116.py

示例4: qui

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def qui(self, ui_list_string, parentObject_string='', opt=''):
        # pre-defined user short name syntax
        type_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem', 
        }
        # get ui_list, creation or existing ui object
        ui_list = [x.strip() for x in ui_list_string.split('|')]
        for i in range(len(ui_list)):
            if ui_list[i] in self.uiList:
                # - exisiting object
                ui_list[i] = self.uiList[ui_list[i]]
            else:
                # - string creation: 
                # get part info
                partInfo = ui_list[i].split(';',1)
                uiName = partInfo[0].split('@')[0]
                uiType = uiName.rsplit('_',1)[-1]
                if uiType in type_dict:
                    uiType = type_dict[uiType]
                # set quickUI string format
                ui_list[i] = partInfo[0]+';'+uiType
                if len(partInfo)==1:
                    # give empty button and label a place holder name
                    if uiType in ('btn', 'btnMsg', 'QPushButton','label', 'QLabel'):
                        ui_list[i] = partInfo[0]+';'+uiType + ';'+uiName 
                elif len(partInfo)==2:
                    ui_list[i]=ui_list[i]+";"+partInfo[1]
        # get parentObject or exisiting object
        parentObject = parentObject_string
        if parentObject in self.uiList:
            parentObject = self.uiList[parentObject]
        # process quickUI
        self.quickUI(ui_list, parentObject, opt) 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:40,代码来源:universal_tool_template_0903.py

示例5: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def __init__(self, parent=None, mode=0):
        super_class.__init__(self, parent)
        #------------------------------
        # class variables
        #------------------------------
        self.version="0.1"
        self.help = "How to Use:\n1. Put source info in\n2. Click Process button\n3. Check result output\n4. Save memory info into a file."
        
        self.uiList={} # for ui obj storage
        self.memoData = {} # key based variable data storage
        
        self.location = ""
        if getattr(sys, 'frozen', False):
            # frozen - cx_freeze
            self.location = sys.executable
        else:
            # unfrozen
            self.location = os.path.realpath(sys.modules[self.__class__.__module__].__file__)
            
        self.name = self.__class__.__name__
        self.iconPath = os.path.join(os.path.dirname(self.location),'icons',self.name+'.png')
        self.iconPix = QtGui.QPixmap(self.iconPath)
        self.icon = QtGui.QIcon(self.iconPath)
        self.fileType='.{0}_EXT'.format(self.name)
        
        #------------------------------
        # core function variable
        #------------------------------
        self.qui_core_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem', 
        }
        self.qui_user_dict = {}
        #------------------------------ 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:40,代码来源:universal_tool_template_0904.py

示例6: qtree

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def qtree(self):
        """ :rtype: QTreeWidget """
        return self._tree 
开发者ID:equinor,项目名称:segyviewer,代码行数:5,代码来源:settingswindow.py

示例7: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def setupUi(self, TPayne_MySQL_Tool):
        TPayne_MySQL_Tool.setObjectName(_fromUtf8("TPayne_MySQL_Tool"))
        TPayne_MySQL_Tool.resize(457, 235)
        self.verticalLayout_2 = QtGui.QVBoxLayout(TPayne_MySQL_Tool)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(TPayne_MySQL_Tool)
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.lineEdit = QtGui.QLineEdit(TPayne_MySQL_Tool)
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.horizontalLayout.addWidget(self.lineEdit)
        self.commitButton = QtGui.QPushButton(TPayne_MySQL_Tool)
        self.commitButton.setObjectName(_fromUtf8("commitButton"))
        self.horizontalLayout.addWidget(self.commitButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.treeWidget = QtGui.QTreeWidget(TPayne_MySQL_Tool)
        self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
        self.verticalLayout.addWidget(self.treeWidget)
        self.verticalLayout_2.addLayout(self.verticalLayout)

        self.retranslateUi(TPayne_MySQL_Tool)
        QtCore.QMetaObject.connectSlotsByName(TPayne_MySQL_Tool) 
开发者ID:TPayneExperience,项目名称:LLP_026_MySQL_PyQt_Example,代码行数:32,代码来源:DB_UI_main.py

示例8: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def setupUi(self, TPayne_MySQL_Tool):
        TPayne_MySQL_Tool.setObjectName(_fromUtf8("TPayne_MySQL_Tool"))
        TPayne_MySQL_Tool.resize(457, 235)
        self.verticalLayout_2 = QtGui.QVBoxLayout(TPayne_MySQL_Tool)
        self.verticalLayout_2.setObjectName(_fromUtf8("verticalLayout_2"))
        self.verticalLayout = QtGui.QVBoxLayout()
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.label = QtGui.QLabel(TPayne_MySQL_Tool)
        font = QtGui.QFont()
        font.setPointSize(20)
        self.label.setFont(font)
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.verticalLayout.addWidget(self.label)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.lineEdit = QtGui.QLineEdit(TPayne_MySQL_Tool)
        self.lineEdit.setObjectName(_fromUtf8("lineEdit"))
        self.horizontalLayout.addWidget(self.lineEdit)
        self.commitButton = QtGui.QPushButton(TPayne_MySQL_Tool)
        self.commitButton.setObjectName(_fromUtf8("commitButton"))
        self.horizontalLayout.addWidget(self.commitButton)
        self.verticalLayout.addLayout(self.horizontalLayout)
        self.treeWidget = QtGui.QTreeWidget(TPayne_MySQL_Tool)
        self.treeWidget.setObjectName(_fromUtf8("treeWidget"))
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget)
        item_0 = QtGui.QTreeWidgetItem(self.treeWidget)
        self.verticalLayout.addWidget(self.treeWidget)
        self.verticalLayout_2.addLayout(self.verticalLayout)

        self.retranslateUi(TPayne_MySQL_Tool)
        QtCore.QMetaObject.connectSlotsByName(TPayne_MySQL_Tool) 
开发者ID:TPayneExperience,项目名称:LLP_026_MySQL_PyQt_Example,代码行数:34,代码来源:DB_UI.py

示例9: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def __init__(self, ecuscan, treeview_ecu):
        super(Ecu_list, self).__init__()
        self.selected = ''
        self.treeview_ecu = treeview_ecu
        self.vehicle_combo = widgets.QComboBox()

        self.ecu_map = {}
        vehicles = [
            "ALL", "XBA - KWID CN", "XBB - KWID BR", "X06 - TWINGO", "X44 - TWINGO II",
            "X07 - TWINGO III", "X77 - MODUS", "X35 - SYMBOL/THALIA", "XJC - SYMBOL/THALIA II",
            "X65 - CLIO II",
            "X85 - CLIO III", "X98 - CLIO IV", "XJA - CLIO V", "X87 - CAPTUR", "XJB - CAPTUR II",
            "XJE - CAPTUR II CN", "X38 - FLUENCE", "XFF - FLUENCE II", "X64 - MEGANE/SCENIC I",
            "X84 - MEGANE/SCENIC II", "X84ph2 - MEGANE/SCENIC II Phase 2", "X95 - MEGANE/SCENIC III",
            "XFB - MEGANE IV", "XFF - MEGANE IV SEDAN",
            "XFA - SCENIC IV", "X56 - LAGUNA", "X74 - LAGUNA II", "X74ph2 - LAGUNA II Phase 2", "X91 - LAGUNA III",
            "X47 - LAGUNA III (tricorps)", "X66 - ESPACE III", "X81 - ESPACE IV", "XFC - ESPACE V",
            "X73 - VELSATIS", "X43 - LATITUDE", "XFD - TALISMAN", "H45 - KOLEOS", "XZG - KOLEOS II",
            "XZJ - KOLEOS II CN", "HFE - KADJAR", "XZH - KADJAR CN", "X33 - WIND", "X09 - TWIZY",
            "X10 - ZOE", "X10Ph2 - ZOE Ph2", "X76 - KANGOO I", "X61 - KANGOO II", "XFK - KANGOO III",
            "X24 - MASCOTT", "X83 - TRAFIC II", "X83ph2 - TRAFIC II Phase 2", "X83ph3 - TRAFIC II Phase 3", "X82 - TRAFFIC III",
            "X70 - MASTER II", "X62 - MASTER III", "X90 - LOGAN/SANDERO",
            "X52 - LOGAN/SANDERO II", "X79 - DUSTER", "X79Ph2 - DUSTER Ph2", "XJD - DUSTER II", "X67 - DOKKER",
            "X92 - LODGY", "XGA - BM LADA", "AS1 - ALPINE", "X02 - MICRA (NISSAN)", "X02E - MICRA (NISSAN)", "X21 - NOTE (NISSAN)"
        ]

        for v in vehicles:
            self.vehicle_combo.addItem(v)

        self.vehicle_combo.activated.connect(self.filterProject)

        layout = widgets.QVBoxLayout()
        layouth = widgets.QHBoxLayout()
        scanbutton = widgets.QPushButton()
        scanbutton.setIcon(gui.QIcon("icons/scan.png"))
        scanbutton.clicked.connect(self.scanselvehicle)
        layouth.addWidget(self.vehicle_combo)
        layouth.addWidget(scanbutton)
        layout.addLayout(layouth)
        self.setLayout(layout)
        self.list = widgets.QTreeWidget(self)
        self.list.setSelectionMode(widgets.QAbstractItemView.SingleSelection)
        layout.addWidget(self.list)
        self.ecuscan = ecuscan
        self.list.doubleClicked.connect(self.ecuSel)
        self.init() 
开发者ID:cedricp,项目名称:ddt4all,代码行数:48,代码来源:ddt4all.py

示例10: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def __init__(self, parent=None, mode=0):
        QtWidgets.QMainWindow.__init__(self, parent)
        #------------------------------
        # class variables
        #------------------------------
        self.version = '0.1'
        self.date = '2017.01.01'
        self.log = 'no version log in user class'
        self.help = 'no help guide in user class'
        self.hotkey = {}
        self.uiList={} # for ui obj storage
        self.memoData = {} # key based variable data storage
        self.memoData['font_size_default'] = QtGui.QFont().pointSize()
        self.memoData['font_size'] = self.memoData['font_size_default']
        self.memoData['last_export'] = ''
        self.memoData['last_import'] = ''
        self.name = self.__class__.__name__
        self.location = ''
        if getattr(sys, 'frozen', False):
            # frozen - cx_freeze
            self.location = sys.executable
        else:
            # unfrozen
            self.location = os.path.realpath(sys.modules[self.__class__.__module__].__file__)
            
        self.iconPath = os.path.join(os.path.dirname(self.location),'icons',self.name+'.png')
        self.iconPix = QtGui.QPixmap(self.iconPath)
        self.icon = QtGui.QIcon(self.iconPath)
        self.fileType='.{0}_EXT'.format(self.name)
        
        #------------------------------
        # core function variable
        #------------------------------
        self.qui_core_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem',
            'menu' : 'QMenu', 'menubar' : 'QMenuBar',
        }
        self.qui_user_dict = {} 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:45,代码来源:universal_tool_template_1116.py

示例11: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def __init__(self, parent=None, mode=0):
        QtWidgets.QMainWindow.__init__(self, parent)
        #------------------------------
        # class variables
        #------------------------------
        self.version = '0.1'
        self.date = '2017.01.01'
        self.log = 'no version log in user class'
        self.help = 'no help guide in user class'
        
        self.uiList={} # for ui obj storage
        self.memoData = {} # key based variable data storage
        self.memoData['font_size_default'] = QtGui.QFont().pointSize()
        self.memoData['font_size'] = self.memoData['font_size_default']
        self.memoData['last_export'] = ''
        self.memoData['last_import'] = ''
        self.name = self.__class__.__name__
        self.location = ''
        if getattr(sys, 'frozen', False):
            # frozen - cx_freeze
            self.location = sys.executable
        else:
            # unfrozen
            self.location = os.path.realpath(sys.modules[self.__class__.__module__].__file__)
            
        self.iconPath = os.path.join(os.path.dirname(self.location),'icons',self.name+'.png')
        self.iconPix = QtGui.QPixmap(self.iconPath)
        self.icon = QtGui.QIcon(self.iconPath)
        self.fileType='.{0}_EXT'.format(self.name)
        
        #------------------------------
        # core function variable
        #------------------------------
        self.qui_core_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem',
            'menu' : 'QMenu', 'menubar' : 'QMenuBar',
        }
        self.qui_user_dict = {} 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:45,代码来源:universal_tool_template_1020.py

示例12: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def __init__(self, parent=None):
        QtWidgets.QMainWindow.__init__(self, parent)

        # class property
        self.tpl_ver = tpl_ver
        self.tpl_date = tpl_date
        self.version = '0.1'
        self.date = '2017.01.01'
        self.log = 'no version log in user class'
        self.help = 'no help guide in user class'
        
        # class info
        self.name = self.__class__.__name__
        self.fileType='.{0}_EXT'.format(self.name)
        
        # class path and icon
        self.location = ''
        if getattr(sys, 'frozen', False):
            self.location = sys.executable # frozen case - cx_freeze
        else:
            self.location = os.path.realpath(sys.modules[self.__class__.__module__].__file__)
        self.iconPath = os.path.join(os.path.dirname(self.location),'icons',self.name+'.png')
        self.iconPix = QtGui.QPixmap(self.iconPath)
        self.icon = QtGui.QIcon(self.iconPath)
        
        # class data
        self.hotkey = {}
        self.uiList={} # for ui obj storage
        self.memoData = {} # key based variable data storage
        self.memoData['font_size_default'] = QtGui.QFont().pointSize()
        self.memoData['font_size'] = self.memoData['font_size_default']
        self.memoData['last_export'] = ''
        self.memoData['last_import'] = ''
        self.memoData['last_browse'] = ''
            
        # core function variable
        self.qui_core_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox', 'spin':'QSpinBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem',
            'menu' : 'QMenu', 'menubar' : 'QMenuBar',
        }
        self.qui_user_dict = {} 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:48,代码来源:universal_tool_template_2010.py

示例13: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def __init__(self, parent=None, mode=0):
        super_class.__init__(self, parent)
        #------------------------------
        # class variables
        #------------------------------
        self.version = "0.1"
        self.date = '2017.01.01'
        self.log = 'no version log in user class'
        self.help = 'no help guide in user class'
        
        self.uiList={} # for ui obj storage
        self.memoData = {} # key based variable data storage
        self.memoData['font_size_default'] = QtGui.QFont().pointSize()
        self.memoData['font_size'] = self.memoData['font_size_default']
        self.memoData['last_export'] = ''
        self.memoData['last_import'] = ''
        self.location = ""
        if getattr(sys, 'frozen', False):
            # frozen - cx_freeze
            self.location = sys.executable
        else:
            # unfrozen
            self.location = os.path.realpath(sys.modules[self.__class__.__module__].__file__)
            
        self.name = self.__class__.__name__
        self.iconPath = os.path.join(os.path.dirname(self.location),'icons',self.name+'.png')
        self.iconPix = QtGui.QPixmap(self.iconPath)
        self.icon = QtGui.QIcon(self.iconPath)
        self.fileType='.{0}_EXT'.format(self.name)
        
        #------------------------------
        # core function variable
        #------------------------------
        self.qui_core_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem',
            'menu' : 'QMenu', 'menubar' : 'QMenuBar',
        }
        self.qui_user_dict = {}
        #------------------------------ 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:46,代码来源:GearBox_template_1010.py

示例14: __init__

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def __init__(self, parent=None, mode=0):
        super_class.__init__(self, parent)
        #------------------------------
        # class variables
        #------------------------------
        self.version = "0.1"
        self.date = '2017.01.01'
        self.log = 'no version log in user class'
        self.help = 'no help guide in user class'
        
        self.uiList={} # for ui obj storage
        self.memoData = {} # key based variable data storage
        self.memoData['font_size_default'] = QtGui.QFont().pointSize()
        self.memoData['font_size'] = self.memoData['font_size_default']
        
        self.location = ""
        if getattr(sys, 'frozen', False):
            # frozen - cx_freeze
            self.location = sys.executable
        else:
            # unfrozen
            self.location = os.path.realpath(sys.modules[self.__class__.__module__].__file__)
            
        self.name = self.__class__.__name__
        self.iconPath = os.path.join(os.path.dirname(self.location),'icons',self.name+'.png')
        self.iconPix = QtGui.QPixmap(self.iconPath)
        self.icon = QtGui.QIcon(self.iconPath)
        self.fileType='.{0}_EXT'.format(self.name)
        
        #------------------------------
        # core function variable
        #------------------------------
        self.qui_core_dict = {
            'vbox': 'QVBoxLayout','hbox':'QHBoxLayout','grid':'QGridLayout', 'form':'QFormLayout',
            'split': 'QSplitter', 'grp':'QGroupBox', 'tab':'QTabWidget',
            'btn':'QPushButton', 'btnMsg':'QPushButton', 'label':'QLabel', 'input':'QLineEdit', 'check':'QCheckBox', 'choice':'QComboBox',
            'txt': 'QTextEdit',
            'list': 'QListWidget', 'tree': 'QTreeWidget', 'table': 'QTableWidget',
            'space': 'QSpacerItem',
            'menu' : 'QMenu', 'menubar' : 'QMenuBar',
        }
        self.qui_user_dict = {}
        #------------------------------ 
开发者ID:shiningdesign,项目名称:universal_tool_template.py,代码行数:45,代码来源:universal_tool_template_1000.py

示例15: setupUi

# 需要导入模块: from PyQt4 import QtGui [as 别名]
# 或者: from PyQt4.QtGui import QTreeWidget [as 别名]
def setupUi(self, dlgEntityDepend):
        dlgEntityDepend.setObjectName(_fromUtf8("dlgEntityDepend"))
        dlgEntityDepend.setWindowModality(QtCore.Qt.WindowModal)
        dlgEntityDepend.resize(358, 296)
        dlgEntityDepend.setContextMenuPolicy(QtCore.Qt.DefaultContextMenu)
        self.verticalLayout = QtGui.QVBoxLayout(dlgEntityDepend)
        self.verticalLayout.setObjectName(_fromUtf8("verticalLayout"))
        self.horizontalLayout_3 = QtGui.QHBoxLayout()
        self.horizontalLayout_3.setSpacing(0)
        self.horizontalLayout_3.setContentsMargins(0, -1, -1, -1)
        self.horizontalLayout_3.setObjectName(_fromUtf8("horizontalLayout_3"))
        self.label = QtGui.QLabel(dlgEntityDepend)
        self.label.setMaximumSize(QtCore.QSize(80, 16777215))
        self.label.setText(_fromUtf8(""))
        self.label.setPixmap(QtGui.QPixmap(_fromUtf8(":/plugins/stdm/images/icons/warning_large.png")))
        self.label.setAlignment(QtCore.Qt.AlignCenter)
        self.label.setObjectName(_fromUtf8("label"))
        self.horizontalLayout_3.addWidget(self.label)
        self.qryLabel = QtGui.QLabel(dlgEntityDepend)
        font = QtGui.QFont()
        font.setPointSize(8)
        font.setBold(False)
        font.setWeight(50)
        self.qryLabel.setFont(font)
        self.qryLabel.setTextFormat(QtCore.Qt.PlainText)
        self.qryLabel.setWordWrap(True)
        self.qryLabel.setObjectName(_fromUtf8("qryLabel"))
        self.horizontalLayout_3.addWidget(self.qryLabel)
        self.verticalLayout.addLayout(self.horizontalLayout_3)
        self.twEntityDepend = QtGui.QTreeWidget(dlgEntityDepend)
        self.twEntityDepend.setObjectName(_fromUtf8("twEntityDepend"))
        self.twEntityDepend.headerItem().setText(0, _fromUtf8("1"))
        self.twEntityDepend.header().setVisible(False)
        self.verticalLayout.addWidget(self.twEntityDepend)
        self.horizontalLayout_2 = QtGui.QHBoxLayout()
        self.horizontalLayout_2.setObjectName(_fromUtf8("horizontalLayout_2"))
        spacerItem = QtGui.QSpacerItem(165, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
        self.horizontalLayout_2.addItem(spacerItem)
        self.horizontalLayout = QtGui.QHBoxLayout()
        self.horizontalLayout.setSizeConstraint(QtGui.QLayout.SetFixedSize)
        self.horizontalLayout.setContentsMargins(-1, -1, 0, -1)
        self.horizontalLayout.setObjectName(_fromUtf8("horizontalLayout"))
        self.btnCancel = QtGui.QPushButton(dlgEntityDepend)
        self.btnCancel.setObjectName(_fromUtf8("btnCancel"))
        self.horizontalLayout.addWidget(self.btnCancel)
        self.btnDelete = QtGui.QPushButton(dlgEntityDepend)
        self.btnDelete.setObjectName(_fromUtf8("btnDelete"))
        self.horizontalLayout.addWidget(self.btnDelete)
        self.horizontalLayout.setStretch(0, 1)
        self.horizontalLayout.setStretch(1, 1)
        self.horizontalLayout_2.addLayout(self.horizontalLayout)
        self.horizontalLayout_2.setStretch(0, 1)
        self.horizontalLayout_2.setStretch(1, 1)
        self.verticalLayout.addLayout(self.horizontalLayout_2)

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


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