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.
This commit is contained in:
Dan Albert 2022-12-29 15:15:16 -08:00
parent e0c13846a7
commit 306971230b
96 changed files with 184 additions and 196 deletions

View File

@ -19,5 +19,3 @@ runs:
run: |
./venv/scripts/activate
python -m pip install -r requirements.txt
# For some reason the shiboken2.abi3.dll is not found properly, so I copy it instead
Copy-Item .\venv\Lib\site-packages\shiboken2\shiboken2.abi3.dll .\venv\Lib\site-packages\PySide2\ -Force

View File

@ -8,13 +8,13 @@ from . import (
flights,
frontlines,
game,
iadsnetwork,
mapzones,
navmesh,
qt,
supplyroutes,
tgos,
waypoints,
iadsnetwork,
)
from .settings import ServerSettings
@ -34,7 +34,7 @@ app.include_router(waypoints.router)
app.include_router(iadsnetwork.router)
origins = []
origins = ["file://"]
if ServerSettings.get().cors_allow_debug_server:
origins.append("http://localhost:3000")

View File

@ -1,9 +1,9 @@
from contextlib import contextmanager
from typing import ContextManager, Optional
from PySide2.QtCore import QModelIndex, Qt, QSize
from PySide2.QtGui import QPainter, QFont, QFontMetrics, QIcon
from PySide2.QtWidgets import QStyledItemDelegate, QStyleOptionViewItem, QStyle
from PySide6.QtCore import QModelIndex, Qt, QSize
from PySide6.QtGui import QPainter, QFont, QFontMetrics, QIcon
from PySide6.QtWidgets import QStyledItemDelegate, QStyleOptionViewItem, QStyle
@contextmanager

View File

@ -3,7 +3,7 @@ from collections.abc import Iterator
from contextlib import contextmanager
from typing import Type
from PySide2.QtWidgets import QDialog, QMessageBox
from PySide6.QtWidgets import QDialog, QMessageBox
@contextmanager

View File

@ -7,10 +7,10 @@ from datetime import datetime
from pathlib import Path
from typing import Optional
from PySide2 import QtWidgets
from PySide2.QtCore import Qt
from PySide2.QtGui import QPixmap
from PySide2.QtWidgets import QApplication, QCheckBox, QSplashScreen
from PySide6 import QtWidgets
from PySide6.QtCore import Qt
from PySide6.QtGui import QPixmap
from PySide6.QtWidgets import QApplication, QCheckBox, QSplashScreen
from dcs.payloads import PayloadDirectories
from game import Game, VERSION, logging_config, persistency
@ -71,10 +71,6 @@ def run_ui(game: Game | None, ui_flags: UiFlags) -> None:
app = QApplication(sys.argv)
app.setAttribute(Qt.AA_DisableWindowContextHelpButton)
app.setAttribute(Qt.AA_EnableHighDpiScaling, True) # enable highdpi scaling
app.setAttribute(Qt.AA_UseHighDpiPixmaps, True) # use highdpi icons
# init the theme and load the stylesheet based on the theme index
liberation_theme.init()
with open(

View File

@ -4,13 +4,13 @@ from __future__ import annotations
import datetime
from typing import Any, Callable, Iterator, Optional, TypeVar
from PySide2.QtCore import (
from PySide6.QtCore import (
QAbstractListModel,
QModelIndex,
Qt,
Signal,
)
from PySide2.QtGui import QIcon
from PySide6.QtGui import QIcon
from game.ato.airtaaskingorder import AirTaskingOrder
from game.ato.flight import Flight

View File

@ -5,7 +5,7 @@ from datetime import datetime, timedelta
from pathlib import Path
from typing import Callable, Optional, TYPE_CHECKING
from PySide2.QtCore import QObject, Signal
from PySide6.QtCore import QObject, Signal
from game.polldebriefingfilethread import PollDebriefingFileThread
from game.sim.gameloop import GameLoop

View File

@ -1,7 +1,7 @@
import os
from typing import Dict
from PySide2.QtGui import QPixmap
from PySide6.QtGui import QPixmap
from .liberation_theme import get_theme_icons

View File

@ -3,8 +3,8 @@ import logging
import sys
import traceback
from PySide2.QtCore import Signal, QObject
from PySide2.QtWidgets import QMessageBox, QApplication
from PySide6.QtCore import Signal, QObject
from PySide6.QtWidgets import QMessageBox, QApplication
class UncaughtExceptionHandler(QObject):

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QLabel, QHBoxLayout, QGroupBox, QPushButton
from PySide6.QtWidgets import QLabel, QHBoxLayout, QGroupBox, QPushButton
import qt_ui.uiconstants as CONST
from game import Game

View File

@ -1,7 +1,7 @@
from datetime import datetime
from PySide2.QtGui import QPixmap
from PySide2.QtWidgets import (
from PySide6.QtGui import QPixmap
from PySide6.QtWidgets import (
QFrame,
QGridLayout,
QGroupBox,

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QFrame
from PySide6.QtWidgets import QFrame
class QDebriefingInformation(QFrame):

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QLabel, QGroupBox, QGridLayout
from PySide6.QtWidgets import QLabel, QGroupBox, QGridLayout
from game import Game

View File

@ -1,5 +1,5 @@
"""Spin box for selecting the number of aircraft in a flight."""
from PySide2.QtWidgets import QSpinBox
from PySide6.QtWidgets import QSpinBox
class QFlightSizeSpinner(QSpinBox):

View File

@ -1,6 +1,6 @@
from typing import Optional
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QGridLayout,
QGroupBox,
QHBoxLayout,

View File

@ -1,8 +1,8 @@
"""A layout containing a widget with an associated label."""
from typing import Optional
from PySide2.QtCore import Qt
from PySide2.QtWidgets import QHBoxLayout, QLabel, QWidget
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QHBoxLayout, QLabel, QWidget
class QLabeledWidget(QHBoxLayout):

View File

@ -1,5 +1,5 @@
from PySide2 import QtCore, QtGui
from PySide2.QtWidgets import QCalendarWidget
from PySide6 import QtCore, QtGui
from PySide6.QtWidgets import QCalendarWidget
class QLiberationCalendar(QCalendarWidget):

View File

@ -1,6 +1,6 @@
from typing import List, Optional
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QDialog,
QFrame,
QGroupBox,

View File

@ -3,18 +3,15 @@ import logging
from datetime import timedelta
from typing import Optional
from PySide2.QtCore import (
from PySide6.QtCore import (
QItemSelectionModel,
QModelIndex,
QSize,
Qt,
)
from PySide2.QtGui import (
QContextMenuEvent,
)
from PySide2.QtWidgets import (
from PySide6.QtGui import QAction, QContextMenuEvent
from PySide6.QtWidgets import (
QAbstractItemView,
QAction,
QGroupBox,
QHBoxLayout,
QLabel,

View File

@ -1,5 +1,5 @@
"""Widgets for displaying client slots."""
from PySide2.QtWidgets import QLabel
from PySide6.QtWidgets import QLabel
from qt_ui.models import AtoModel
from qt_ui.widgets.QLabeledWidget import QLabeledWidget

View File

@ -1,5 +1,5 @@
"""Combo box for selecting aircraft types."""
from PySide2.QtWidgets import QComboBox
from PySide6.QtWidgets import QComboBox
from game.dcs.aircrafttype import AircraftType

View File

@ -1,7 +1,7 @@
"""Combo box for selecting a departure airfield."""
from typing import Iterable, Optional
from PySide2.QtWidgets import QComboBox
from PySide6.QtWidgets import QComboBox
from dcs.unittype import FlyingType
from game.dcs.aircrafttype import AircraftType

View File

@ -1,5 +1,5 @@
from PySide2.QtCore import QSortFilterProxyModel, Qt
from PySide2.QtWidgets import QComboBox, QCompleter
from PySide6.QtCore import QSortFilterProxyModel, Qt
from PySide6.QtWidgets import QComboBox, QCompleter
class QFilteredComboBox(QComboBox):

View File

@ -1,6 +1,6 @@
"""Combo box for selecting a flight's task type."""
from PySide2.QtWidgets import QComboBox
from PySide6.QtWidgets import QComboBox
from game.ato.flighttype import FlightType
from game.settings.settings import Settings

View File

@ -1,4 +1,4 @@
from PySide2.QtGui import QStandardItem, QStandardItemModel
from PySide6.QtGui import QStandardItem, QStandardItemModel
from game import Game
from game.ato.flightwaypoint import FlightWaypoint

View File

@ -1,6 +1,6 @@
from typing import Optional
from PySide2.QtWidgets import QSpinBox
from PySide6.QtWidgets import QSpinBox
class FloatSpinner(QSpinBox):

View File

@ -3,12 +3,9 @@ from __future__ import annotations
import logging
from pathlib import Path
from PySide2.QtCore import QUrl
from PySide2.QtWebEngineWidgets import (
QWebEnginePage,
QWebEngineSettings,
QWebEngineView,
)
from PySide6.QtCore import QUrl
from PySide6.QtWebEngineCore import QWebEnginePage, QWebEngineSettings
from PySide6.QtWebEngineWidgets import QWebEngineView
from game.server.settings import ServerSettings
from qt_ui.models import GameModel
@ -40,7 +37,7 @@ class QLiberationMap(QWebEngineView):
# Required to allow "cross-origin" access from file:// scoped canvas.html to the
# localhost HTTP backend.
self.page.settings().setAttribute(
QWebEngineSettings.LocalContentCanAccessRemoteUrls, True
QWebEngineSettings.WebAttribute.LocalContentCanAccessRemoteUrls, True
)
if dev:

View File

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import Optional
from PySide2.QtWidgets import QButtonGroup, QHBoxLayout, QPushButton, QWidget
from PySide6.QtWidgets import QButtonGroup, QHBoxLayout, QPushButton, QWidget
from game.sim.simspeedsetting import SimSpeedSetting
from qt_ui.simcontroller import SimController

View File

@ -1,9 +1,9 @@
from datetime import timedelta
from typing import Optional
from PySide2 import QtWidgets
from PySide2.QtCore import Qt
from PySide2.QtWidgets import QSlider, QHBoxLayout
from PySide6 import QtWidgets
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QSlider, QHBoxLayout
from qt_ui.widgets.floatspinners import FloatSpinner

View File

@ -1,14 +1,14 @@
from typing import Iterable, Iterator, Optional
from PySide2.QtCore import (
from PySide6.QtCore import (
QItemSelection,
QItemSelectionModel,
QSize,
Qt,
Signal,
)
from PySide2.QtGui import QIcon, QStandardItem, QStandardItemModel
from PySide2.QtWidgets import (
from PySide6.QtGui import QIcon, QStandardItem, QStandardItemModel
from PySide6.QtWidgets import (
QCheckBox,
QComboBox,
QDialog,

View File

@ -3,8 +3,8 @@ from __future__ import annotations
from dataclasses import dataclass
from typing import Optional, Iterator
from PySide2.QtCore import QItemSelectionModel, QModelIndex, QSize
from PySide2.QtWidgets import (
from PySide6.QtCore import QItemSelectionModel, QModelIndex, QSize
from PySide6.QtWidgets import (
QAbstractItemView,
QCheckBox,
QDialog,

View File

@ -1,8 +1,8 @@
import webbrowser
from PySide2.QtCore import Qt
from PySide2.QtGui import QGuiApplication
from PySide2.QtWidgets import QDialog, QLabel, QPushButton, QVBoxLayout, QWidget
from PySide6.QtCore import Qt
from PySide6.QtGui import QGuiApplication
from PySide6.QtWidgets import QDialog, QLabel, QPushButton, QVBoxLayout, QWidget
from game.version import BUILD_NUMBER, GIT_SHA, VERSION_NUMBER

View File

@ -2,7 +2,7 @@ from __future__ import annotations
from typing import Optional
from PySide2.QtCore import QObject, Signal
from PySide6.QtCore import QObject, Signal
from game import Game
from game.debriefing import Debriefing

View File

@ -1,13 +1,12 @@
from PySide2.QtCore import (
from PySide6.QtCore import (
QItemSelection,
QItemSelectionModel,
QModelIndex,
Qt,
)
from PySide2.QtGui import QContextMenuEvent
from PySide2.QtWidgets import (
from PySide6.QtGui import QAction, QContextMenuEvent
from PySide6.QtWidgets import (
QAbstractItemView,
QAction,
QDialog,
QHBoxLayout,
QListView,

View File

@ -1,8 +1,8 @@
import logging
from typing import Callable, Dict, TypeVar
from PySide2.QtGui import QIcon, QPixmap
from PySide2.QtWidgets import (
from PySide6.QtGui import QIcon, QPixmap
from PySide6.QtWidgets import (
QDialog,
QGridLayout,
QGroupBox,

View File

@ -3,13 +3,10 @@ import traceback
import webbrowser
from typing import Optional
from PySide2.QtCore import QSettings, Qt, Signal
from PySide2.QtGui import QCloseEvent, QIcon
from PySide2.QtWidgets import (
QAction,
QActionGroup,
from PySide6.QtCore import QSettings, Qt, Signal
from PySide6.QtGui import QAction, QActionGroup, QCloseEvent, QGuiApplication, QIcon
from PySide6.QtWidgets import (
QApplication,
QDesktopWidget,
QFileDialog,
QMainWindow,
QMessageBox,
@ -97,7 +94,7 @@ class QLiberationWindow(QMainWindow):
# Default to maximized on the main display if we don't have any persistent
# configuration.
screen = QDesktopWidget().screenGeometry()
screen = QGuiApplication.primaryScreen().availableSize()
self.setGeometry(0, 0, screen.width(), screen.height())
self.setWindowState(Qt.WindowMaximized)
@ -133,7 +130,7 @@ class QLiberationWindow(QMainWindow):
vbox.setSizes([600, 100])
vbox = QVBoxLayout()
vbox.setMargin(0)
vbox.setContentsMargins(0, 0, 0, 0)
vbox.addWidget(QTopPanel(self.game_model, self.sim_controller, ui_flags))
vbox.addWidget(hbox)

View File

@ -1,8 +1,8 @@
from __future__ import annotations
from PySide2.QtCore import Qt
from PySide2.QtGui import QIcon
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtGui import QIcon
from PySide6.QtWidgets import (
QDialog,
QGridLayout,
QLabel,

View File

@ -5,10 +5,10 @@ import os
from pathlib import Path
from typing import Optional
from PySide2 import QtCore
from PySide2.QtCore import QObject, Signal
from PySide2.QtGui import QIcon, QMovie, QPixmap
from PySide2.QtWidgets import (
from PySide6 import QtCore
from PySide6.QtCore import QObject, Signal
from PySide6.QtGui import QIcon, QMovie, QPixmap
from PySide6.QtWidgets import (
QDialog,
QFileDialog,
QGridLayout,

View File

@ -1,8 +1,8 @@
import logging
from typing import Callable, Iterator, Optional
from PySide2.QtCore import QItemSelection, QItemSelectionModel, QModelIndex, Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import QItemSelection, QItemSelectionModel, QModelIndex, Qt
from PySide6.QtWidgets import (
QAbstractItemView,
QCheckBox,
QComboBox,

View File

@ -1,5 +1,5 @@
from PySide2.QtCore import Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (
QFrame,
QGridLayout,
QGroupBox,

View File

@ -4,8 +4,8 @@ import logging
from collections import defaultdict
from typing import Callable, Dict, Type
from PySide2.QtCore import Qt, Signal
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt, Signal
from PySide6.QtWidgets import (
QComboBox,
QDialog,
QFrame,

View File

@ -1,6 +1,6 @@
from PySide2.QtCore import Qt
from PySide2.QtGui import QCloseEvent, QPixmap
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtGui import QCloseEvent, QPixmap
from PySide6.QtWidgets import (
QDialog,
QHBoxLayout,
QLabel,

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QTabWidget
from PySide6.QtWidgets import QTabWidget
from game.theater import ControlPoint, Fob
from qt_ui.models import GameModel

View File

@ -4,8 +4,8 @@ import logging
from enum import Enum
from typing import Generic, TypeVar
from PySide2.QtCore import Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (
QApplication,
QFrame,
QGridLayout,

View File

@ -1,7 +1,7 @@
from typing import Set
from PySide2.QtCore import Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (
QGridLayout,
QHBoxLayout,
QLabel,

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QFrame, QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
from PySide6.QtWidgets import QFrame, QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
from game.theater import ControlPoint
from qt_ui.models import GameModel

View File

@ -1,5 +1,5 @@
from PySide2.QtCore import Qt
from PySide2.QtWidgets import QGridLayout, QScrollArea, QVBoxLayout, QWidget
from PySide6.QtCore import Qt
from PySide6.QtWidgets import QGridLayout, QScrollArea, QVBoxLayout, QWidget
from game.dcs.groundunittype import GroundUnitType
from game.theater import ControlPoint

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QFrame, QGridLayout
from PySide6.QtWidgets import QFrame, QGridLayout
from game.theater import ControlPoint
from qt_ui.models import GameModel

View File

@ -1,6 +1,6 @@
from collections.abc import Callable
from PySide2.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout
from PySide6.QtWidgets import QGroupBox, QLabel, QPushButton, QVBoxLayout
from game import Game
from game.server import EventStream

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QComboBox
from PySide6.QtWidgets import QComboBox
from game.theater import CombatStance, ControlPoint

View File

@ -1,7 +1,7 @@
from collections import defaultdict
from PySide2.QtCore import Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (
QFrame,
QGridLayout,
QGroupBox,

View File

@ -1,7 +1,7 @@
import itertools
from typing import Optional
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QDialog,
QFrame,
QGridLayout,

View File

@ -1,7 +1,7 @@
import os
from PySide2.QtGui import QPixmap
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
from PySide6.QtGui import QPixmap
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
from game.theater import TheaterUnit
from game.config import REWARDS

View File

@ -3,9 +3,9 @@ from collections import defaultdict
from dataclasses import dataclass, field
from typing import Type
from PySide2.QtCore import Signal
from PySide2.QtGui import Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import Signal
from PySide6.QtGui import Qt
from PySide6.QtWidgets import (
QCheckBox,
QComboBox,
QDialog,

View File

@ -1,7 +1,7 @@
import logging
from PySide2.QtGui import QTransform
from PySide2.QtWidgets import (
from PySide6.QtGui import QTransform
from PySide6.QtWidgets import (
QDialog,
QGridLayout,
QGroupBox,

View File

@ -1,4 +1,4 @@
from PySide2.QtGui import QStandardItem
from PySide6.QtGui import QStandardItem
from game.infos.information import Information

View File

@ -1,6 +1,6 @@
from PySide2.QtCore import QItemSelectionModel, QPoint
from PySide2.QtGui import QStandardItemModel
from PySide2.QtWidgets import QListView
from PySide6.QtCore import QItemSelectionModel, QPoint
from PySide6.QtGui import QStandardItemModel
from PySide6.QtWidgets import QListView
from game import Game, game
from qt_ui.windows.infos.QInfoItem import QInfoItem

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QFrame, QVBoxLayout, QLabel, QGroupBox
from PySide6.QtWidgets import QFrame, QVBoxLayout, QLabel, QGroupBox
from game import Game
from qt_ui.windows.infos.QInfoList import QInfoList

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QFrame, QLabel, QGridLayout
from PySide6.QtWidgets import QFrame, QLabel, QGridLayout
from game.infos.information import Information

View File

@ -1,7 +1,7 @@
import itertools
from typing import Optional
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QCheckBox,
QDialog,
QFrame,

View File

@ -1,14 +1,14 @@
import logging
import typing
from PySide2.QtCore import Signal
from PySide2.QtWidgets import (
from PySide6.QtCore import Signal
from PySide6.QtWidgets import (
QDialog,
QPlainTextEdit,
QVBoxLayout,
QPushButton,
)
from PySide2.QtGui import QTextCursor, QIcon
from PySide6.QtGui import QTextCursor, QIcon
from qt_ui.logging_handler import HookableInMemoryHandler

View File

@ -1,5 +1,5 @@
"""Dialog window for editing flights."""
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QDialog,
QVBoxLayout,
)

View File

@ -1,4 +1,4 @@
from PySide2.QtGui import QIcon, QStandardItem
from PySide6.QtGui import QIcon, QStandardItem
from game.ato.flight import Flight
from game.ato.package import Package

View File

@ -3,8 +3,8 @@ import logging
from datetime import timedelta
from typing import Optional
from PySide2.QtCore import QItemSelection, QTime, Qt, Signal
from PySide2.QtWidgets import (
from PySide6.QtCore import QItemSelection, QTime, Qt, Signal
from PySide6.QtWidgets import (
QCheckBox,
QDialog,
QHBoxLayout,

View File

@ -1,8 +1,8 @@
from datetime import timedelta
from PySide2.QtCore import QItemSelectionModel, QSize
from PySide2.QtGui import QStandardItemModel
from PySide2.QtWidgets import QAbstractItemView, QListView
from PySide6.QtCore import QItemSelectionModel, QSize
from PySide6.QtGui import QStandardItemModel
from PySide6.QtWidgets import QAbstractItemView, QListView
from game.theater.controlpoint import ControlPoint
from qt_ui.models import GameModel

View File

@ -1,7 +1,7 @@
from typing import Optional, Type
from PySide2.QtCore import Qt, Signal
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt, Signal
from PySide6.QtWidgets import (
QComboBox,
QDialog,
QLabel,

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QTabWidget
from PySide6.QtWidgets import QTabWidget
from game import Game
from game.ato.flight import Flight

View File

@ -1,7 +1,7 @@
"""Combo box for selecting squadrons."""
from typing import Optional
from PySide2.QtWidgets import QComboBox
from PySide6.QtWidgets import QComboBox
from game.dcs.aircrafttype import AircraftType
from game.squadrons.airwing import AirWing

View File

@ -1,5 +1,5 @@
from PySide2.QtCore import Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (
QComboBox,
QFrame,
QLabel,

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QGridLayout,
QGroupBox,
QLabel,

View File

@ -2,7 +2,7 @@ import logging
import operator
from typing import Optional
from PySide2.QtWidgets import QComboBox
from PySide6.QtWidgets import QComboBox
from game import Game
from game.data.weapons import Pylon, Weapon

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QGridLayout, QLabel
from PySide6.QtWidgets import QGridLayout, QLabel
from game.ato import Flight
from .propertyselector import PropertySelector

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QComboBox
from PySide6.QtWidgets import QComboBox
from game.ato import Flight
from game.dcs.unitproperty import UnitProperty

View File

@ -1,6 +1,6 @@
import logging
from PySide2.QtWidgets import QGroupBox, QLabel, QMessageBox, QVBoxLayout
from PySide6.QtWidgets import QGroupBox, QLabel, QMessageBox, QVBoxLayout
from game import Game
from game.ato.flight import Flight

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLabel
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLabel
from game.ato.flight import Flight

View File

@ -1,8 +1,8 @@
import logging
from typing import Optional, Callable
from PySide2.QtCore import Signal, QModelIndex
from PySide2.QtWidgets import (
from PySide6.QtCore import Signal, QModelIndex
from PySide6.QtWidgets import (
QLabel,
QGroupBox,
QSpinBox,

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QComboBox,
QGroupBox,
QHBoxLayout,

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QLabel, QGroupBox, QGridLayout
from PySide6.QtWidgets import QLabel, QGroupBox, QGridLayout
from qt_ui.uiconstants import AIRCRAFT_ICONS

View File

@ -1,5 +1,5 @@
from PySide2.QtCore import Signal
from PySide2.QtWidgets import QFrame, QGridLayout, QVBoxLayout
from PySide6.QtCore import Signal
from PySide6.QtWidgets import QFrame, QGridLayout, QVBoxLayout
from game import Game
from game.ato.flight import Flight

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
from PySide6.QtWidgets import QGroupBox, QHBoxLayout, QLabel, QVBoxLayout
from game.ato.flightwaypoint import FlightWaypoint

View File

@ -1,6 +1,6 @@
from typing import List
from PySide2.QtGui import QStandardItem
from PySide6.QtGui import QStandardItem
from game.ato.flightwaypoint import FlightWaypoint

View File

@ -1,8 +1,8 @@
from datetime import timedelta
from PySide2.QtCore import QItemSelectionModel, QPoint
from PySide2.QtGui import QStandardItem, QStandardItemModel
from PySide2.QtWidgets import QHeaderView, QTableView
from PySide6.QtCore import QItemSelectionModel, QPoint
from PySide6.QtGui import QStandardItem, QStandardItemModel
from PySide6.QtWidgets import QHeaderView, QTableView
from game.ato.package import Package
from game.ato.flightwaypointtype import FlightWaypointType

View File

@ -1,8 +1,8 @@
import logging
from typing import Iterable, List, Optional
from PySide2.QtCore import Signal
from PySide2.QtWidgets import (
from PySide6.QtCore import Signal
from PySide6.QtWidgets import (
QFrame,
QGridLayout,
QLabel,

View File

@ -1,5 +1,5 @@
from PySide2.QtCore import Qt, Signal
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt, Signal
from PySide6.QtWidgets import (
QCheckBox,
QDialog,
QHBoxLayout,

View File

@ -2,10 +2,10 @@ from __future__ import annotations
from typing import Optional
from PySide2 import QtGui
from PySide2.QtCore import QItemSelectionModel, QModelIndex, Qt
from PySide2.QtGui import QPixmap, QStandardItem, QStandardItemModel
from PySide2.QtWidgets import QAbstractItemView, QListView
from PySide6 import QtGui
from PySide6.QtCore import QItemSelectionModel, QModelIndex, Qt
from PySide6.QtGui import QPixmap, QStandardItem, QStandardItemModel
from PySide6.QtWidgets import QAbstractItemView, QListView
from game.campaignloader.campaign import Campaign
from qt_ui.liberation_install import get_dcs_install_directory

View File

@ -4,9 +4,9 @@ import logging
from datetime import datetime, timedelta
from typing import List
from PySide2 import QtGui, QtWidgets
from PySide2.QtCore import QDate, QItemSelectionModel, QPoint, Qt, Signal
from PySide2.QtWidgets import QCheckBox, QLabel, QTextEdit, QVBoxLayout
from PySide6 import QtGui, QtWidgets
from PySide6.QtCore import QDate, QItemSelectionModel, QPoint, Qt, Signal
from PySide6.QtWidgets import QCheckBox, QLabel, QTextEdit, QVBoxLayout
from jinja2 import Environment, FileSystemLoader, select_autoescape
from game.campaignloader.campaign import Campaign, DEFAULT_BUDGET

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import (
from PySide6.QtWidgets import (
QDialog,
QPlainTextEdit,
QVBoxLayout,
@ -6,8 +6,8 @@ from PySide2.QtWidgets import (
QPushButton,
QLabel,
)
from PySide2.QtGui import QTextCursor
from PySide2.QtCore import QTimer
from PySide6.QtGui import QTextCursor
from PySide6.QtCore import QTimer
import qt_ui.uiconstants as CONST
from game.game import Game

View File

@ -1,5 +1,5 @@
from PySide2.QtGui import QIcon, Qt
from PySide2.QtWidgets import (
from PySide6.QtGui import QIcon, Qt
from PySide6.QtWidgets import (
QDialog,
QVBoxLayout,
QPushButton,

View File

@ -1,7 +1,7 @@
import os
from PySide2.QtGui import Qt
from PySide2.QtWidgets import (
from PySide6.QtGui import Qt
from PySide6.QtWidgets import (
QComboBox,
QFileDialog,
QFrame,

View File

@ -1,5 +1,5 @@
from PySide2.QtGui import QIcon, Qt
from PySide2.QtWidgets import QDialog, QVBoxLayout, QPushButton, QHBoxLayout
from PySide6.QtGui import QIcon, Qt
from PySide6.QtWidgets import QDialog, QVBoxLayout, QPushButton, QHBoxLayout
from qt_ui.windows.preferences.QLiberationPreferences import QLiberationPreferences

View File

@ -2,9 +2,9 @@ import logging
import textwrap
from typing import Callable
from PySide2.QtCore import QItemSelectionModel, QPoint, QSize, Qt
from PySide2.QtGui import QStandardItem, QStandardItemModel
from PySide2.QtWidgets import (
from PySide6.QtCore import QItemSelectionModel, QPoint, QSize, Qt
from PySide6.QtGui import QStandardItem, QStandardItemModel
from PySide6.QtWidgets import (
QAbstractItemView,
QCheckBox,
QComboBox,

View File

@ -1,5 +1,5 @@
from PySide2.QtCore import Qt
from PySide2.QtWidgets import (
from PySide6.QtCore import Qt
from PySide6.QtWidgets import (
QCheckBox,
QGridLayout,
QGroupBox,

View File

@ -1,7 +1,8 @@
from PySide2.QtCharts import QtCharts
from PySide2.QtCore import QPoint, Qt
from PySide2.QtGui import QPainter
from PySide2.QtWidgets import QFrame, QGridLayout
from PySide6 import QtCharts
from PySide6.QtCore import QPoint, Qt
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import QFrame, QGridLayout
from game import Game

View File

@ -1,7 +1,8 @@
from PySide2.QtCharts import QtCharts
from PySide2.QtCore import QPoint, Qt
from PySide2.QtGui import QPainter
from PySide2.QtWidgets import QFrame, QGridLayout
from PySide6 import QtCharts
from PySide6.QtCore import QPoint, Qt
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import QFrame, QGridLayout
from game import Game

View File

@ -1,4 +1,4 @@
from PySide2.QtWidgets import QDialog, QGridLayout, QTabWidget
from PySide6.QtWidgets import QDialog, QGridLayout, QTabWidget
import qt_ui.uiconstants as CONST
from game.game import Game

View File

@ -1,4 +1,4 @@
altgraph==0.17.2
altgraph==0.17.2
anyio==3.6.1
asgiref==3.5.2
atomicwrites==1.4.1
@ -38,14 +38,16 @@ pyinstaller-hooks-contrib==2022.8
pyparsing==3.0.9
pyproj==3.3.1
pyshp==2.3.1
PySide2==5.15.2.1
PySide6==6.4.1
PySide6-Addons==6.4.1
PySide6-Essentials==6.4.1
pytest==7.1.2
python-dateutil==2.8.2
python-dotenv==0.20.0
pywin32-ctypes==0.2.0
PyYAML==6.0
Shapely==1.8.2
shiboken2==5.15.2.1
shiboken6==6.4.1
six==1.16.0
sniffio==1.2.0
starlette==0.19.1