Beispiel #1
0
 def _initdata(self, searchkey, searchtype):
     self.setviewdata(self.searchkey, self.searchtype)
     comboview=QTreeView()
     if self.flag==u'FERT':
         gtree(self.comboBox, comboview, "producttype")
     else:
         gtree(self.comboBox, comboview, "materialtype")
     self.comboBox.view().setFixedWidth(230)
     self.comboBox.currentIndexChanged.connect(self.getcombotext)
    def __init__(self, parent=None, comboboxtext=None):
        """
        Constructor
        
        @param parent reference to the parent widget
        @type QWidget
        """
        super(Dialog_priceTemplate, self).__init__(parent)
        self.setupUi(self)
        self.setIcon()
        self.curItemIndex=None
        self.comboboxtext=comboboxtext
        self.maxRow=10
        
        ctreeview=QTreeView()
#        self.comboBox.setEditable(True)
        treecombo=gtree(self.comboBox, ctreeview, 'pricetemplateh')
        if self.comboboxtext==None or self.comboboxtext[2]-self.comboboxtext[1]!=1:
            self.comboBox.setEditable(False)
            self.comboBox.setEnabled(True)
        else:
            self.comboBox.setEditable(True)
            self.comboBox.setEnabled(False)
            self.comboBox.setCurrentText(self.comboboxtext[0])
            
            
        
            

        self.setTableViewShow()
 def __init__(self, parent=None, comboboxtext=None):
     """
     Constructor
     
     @param parent reference to the parent widget
     @type QWidget
     """
     super(Dialog_priceTemplate_modify, self).__init__(parent)
     self.comboboxtext=comboboxtext
     self.setupUi(self)
     self.setIcon()
     self.curItemIndex=None
     ctreeview=QTreeView()
     self.comboBox.setEditable(True)
     self.comboBox.setEnabled(False)
     gtree(self.comboBox, ctreeview, 'pricetemplateh')
     self.comboBox.setCurrentText(self.comboboxtext)
     self.setTableViewShow()
Beispiel #4
0
 def _initdata(self, searchkey, searchtype):
     self.setviewdata(self.searchkey, self.searchtype)
     comboview=QTreeView()
     gtree(self.comboBox, comboview, "producttype")
     self.comboBox.view().setFixedWidth(230)
     self.comboBox.currentIndexChanged.connect(self.getcombotext)
Beispiel #5
0
 def _createMTypecomboview(self, tablename):
     self.treeview=QTreeView()
     gtree(self.comboBox_MDType, self.treeview, tablename)