add focus strong in combobox
This commit is contained in:
parent
7cf806cd81
commit
1c5c2801d1
|
@ -315,7 +315,7 @@ class FieldNumeric(QLineEdit):
|
|||
|
||||
def value_edited(self, amount):
|
||||
self.value_changed = True
|
||||
|
||||
|
||||
def text_changed(self, amount):
|
||||
if amount == '':
|
||||
return
|
||||
|
@ -343,6 +343,7 @@ class ComboBox(QComboBox):
|
|||
self.form = form
|
||||
self.setFrame(True)
|
||||
self.setObjectName('field_' + key)
|
||||
self.setFocusPolicy(Qt.StrongFocus)
|
||||
values = []
|
||||
if data.get('values'):
|
||||
values = data.get('values')
|
||||
|
@ -377,6 +378,10 @@ class ComboBox(QComboBox):
|
|||
def get_value(self):
|
||||
return self.get_id()
|
||||
|
||||
def wheelEvent(self, event):
|
||||
if self.hasFocus():
|
||||
super(ComboBox, self).wheelEvent(event)
|
||||
|
||||
def get_id(self):
|
||||
model = self.model()
|
||||
row = self.currentIndex()
|
||||
|
|
Loading…
Reference in New Issue