mirror of
https://github.com/iperov/DeepFaceLive
synced 2025-08-20 13:33:25 -07:00
qt refactoring
This commit is contained in:
parent
9afde06f50
commit
9ef7be4f3a
59 changed files with 632 additions and 890 deletions
|
@ -6,23 +6,11 @@ from ._part_QXWidget import _part_QXWidget
|
|||
from typing import List
|
||||
|
||||
class QXComboBox(QComboBox, _part_QXWidget):
|
||||
def __init__(self, choices : List[str] = None,
|
||||
on_index_changed=None,
|
||||
font=None, tooltip_text=None,
|
||||
minimum_width=None, maximum_width=None, fixed_width=None, minimum_height=None, maximum_height=None, fixed_height=None, size_policy=None, hided=False, enabled=True):
|
||||
def __init__(self, choices : List[str] = None, on_index_changed=None, **kwargs):
|
||||
super().__init__()
|
||||
|
||||
if choices is not None:
|
||||
for choice in choices:
|
||||
self.addItem(choice)
|
||||
|
||||
[ self.addItem(choice) for choice in choices ] if choices is not None else []
|
||||
_part_QXWidget.connect_signal(on_index_changed, self.currentIndexChanged)
|
||||
_part_QXWidget.__init__(self, font=font, tooltip_text=tooltip_text,
|
||||
size_policy=size_policy,
|
||||
minimum_width=minimum_width, maximum_width=maximum_width,
|
||||
minimum_height=minimum_height, maximum_height=maximum_height,
|
||||
fixed_width=fixed_width, fixed_height=fixed_height,
|
||||
hided=hided, enabled=enabled )
|
||||
_part_QXWidget.__init__(self, **kwargs)
|
||||
|
||||
def focusInEvent(self, ev : QFocusEvent):
|
||||
super().focusInEvent(ev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue