Esempio n. 1
0
 def __init__(self, item, column, value, attrDescriptor, defaultTooltip, parent):
     QComboBox.__init__(self, parent)
     self._focusProxy = comboBoxScrollProxy(self)
     #self.setEditable(True)
     #self.setInsertPolicy(QComboBox.NoInsert)
     self.setEnabled(True)
     self.item = item
     self.column = column
     self.defaultTooltip = defaultTooltip
     self.desc = attrDescriptor
     i = int(0)
     for v in attrDescriptor.availableValues():
         got, text, hint, _, _ = attrDescriptor.valueHint(v)
         self.addItem(text, v)
         if got and hint:
             self.setItemData(i, hint, Qt.ToolTipRole)
         i += int(1)
     self.setCurrentIndex(self.findData(value))
     self.value = value
     hint = self.itemData(self.currentIndex(), Qt.ToolTipRole)
     if hint is not None and hint:
         self.item.setToolTip(self.column, hint)
     self.currentIndexChanged.connect(self.onIndexChange)
Esempio n. 2
0
 def __init__(self, item, column, value, attrDescriptor, defaultTooltip,
              parent):
     QComboBox.__init__(self, parent)
     self._focusProxy = comboBoxScrollProxy(self)
     #self.setEditable(True)
     #self.setInsertPolicy(QComboBox.NoInsert)
     self.setEnabled(True)
     self.item = item
     self.column = column
     self.defaultTooltip = defaultTooltip
     self.desc = attrDescriptor
     i = int(0)
     for v in attrDescriptor.availableValues():
         got, text, hint, _, _ = attrDescriptor.valueHint(v)
         self.addItem(text, v)
         if got and hint:
             self.setItemData(i, hint, Qt.ToolTipRole)
         i += int(1)
     self.setCurrentIndex(self.findData(value))
     self.value = value
     hint = self.itemData(self.currentIndex(), Qt.ToolTipRole)
     if hint is not None and hint:
         self.item.setToolTip(self.column, hint)
     self.currentIndexChanged.connect(self.onIndexChange)
Esempio n. 3
0
 def __init__(self, *args, **kwargs):
     QComboBox.__init__(self, *args, **kwargs)
     self._focusProxy = comboBoxScrollProxy(self)
Esempio n. 4
0
 def __init__(self, *args, **kwargs):
     QComboBox.__init__(self, *args, **kwargs)
     self._focusProxy = comboBoxScrollProxy(self)