mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 20:54:15 +02:00
[view] improvement: able to define min width for multiple select component
This commit is contained in:
@@ -521,6 +521,9 @@ class MultipleSelectQt(QGroupBox):
|
||||
self._layout = QGridLayout()
|
||||
self.setLayout(self._layout)
|
||||
|
||||
if model.min_width and model.min_width > 0:
|
||||
self.setMinimumWidth(int(model.min_width))
|
||||
|
||||
if model.max_width > 0:
|
||||
self.setMaximumWidth(int(model.max_width))
|
||||
|
||||
@@ -579,6 +582,9 @@ class FormMultipleSelectQt(QWidget):
|
||||
self.model = model
|
||||
self.setSizePolicy(QSizePolicy.Minimum, QSizePolicy.Preferred)
|
||||
|
||||
if model.min_width and model.min_width > 0:
|
||||
self.setMinimumWidth(int(model.min_width))
|
||||
|
||||
if model.max_width > 0:
|
||||
self.setMaximumWidth(int(model.max_width))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user