add focus strong in combobox

This commit is contained in:
Wilson Gomez 2022-11-25 15:36:25 -05:00
parent 7cf806cd81
commit 1c5c2801d1
1 changed files with 6 additions and 1 deletions

View File

@ -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()