dcs_liberation/qt_ui/widgets/QFlightSizeSpinner.py
Dan Albert 306971230b Update to PySide6.
It sounds like PySide2 will not be moving to Python 3.11, so we're stuck
on 3.10 without this. Upgrading to a newer Qt also fixes some high DPI
bugs (the file browser dialog for save/load is no longer tiny on 4k).

https://github.com/pyinstaller/pyinstaller/issues/5414 previously
blocked this, but the bug appears to be fixed now.
2022-12-29 16:26:50 -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)