Flip the boolean for scrollable combo boxes

This commit is contained in:
Veronica Berglyd Olsen
2025-10-26 02:07:55 +01:00
parent 8b02c95f51
commit e0bd7d82fb
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -126,12 +126,12 @@ class NComboBox(QComboBox):
"""
def __init__(
self, parent: QWidget | None = None, maxItems: int = 15, scrollable: bool = True
self, parent: QWidget | None = None, maxItems: int = 15, scrollable: bool = False
) -> None:
super().__init__(parent=parent)
self.setFocusPolicy(Qt.FocusPolicy.StrongFocus)
self.setMaxVisibleItems(maxItems)
if not scrollable:
if scrollable:
# The style sheet disables Fusion style pop-up mode on some
# platforms and allows for scrolling of long lists of items
self.setStyleSheet("QComboBox {combobox-popup: 0;}")