dcs-retribution/qt_ui/widgets/QFlightSizeSpinner.py
Dan Albert 4a7dae9cc2 Upgrade to PySide6.
PySide2 renamed to PySide6 for Qt 6 support. It doesn't seem like
PySide2 is getting a 3.10 wheel, so upgrade to Qt 6 to prep for that.
2021-11-20 19:26:18 -08:00

15 lines
450 B
Python

"""Spin box for selecting the number of aircraft in a flight."""
from PySide6.QtWidgets import QSpinBox
class QFlightSizeSpinner(QSpinBox):
"""Spin box for selecting the number of aircraft in a flight."""
def __init__(
self, min_size: int = 1, max_size: int = 4, default_size: int = 2
) -> None:
super().__init__()
self.setMinimum(min_size)
self.setMaximum(max_size)
self.setValue(default_size)