diff --git a/flake.nix b/flake.nix
index de4ed83d..b0f406cd 100644
--- a/flake.nix
+++ b/flake.nix
@@ -44,7 +44,7 @@
paramiko
plumbum
pylpsd
- pyqt5
+ pyqt6
pyqtgraph
pyrp3
pytest
diff --git a/linien-gui/linien_gui/app.py b/linien-gui/linien_gui/app.py
index abda7037..4a108b35 100644
--- a/linien-gui/linien_gui/app.py
+++ b/linien-gui/linien_gui/app.py
@@ -27,8 +27,8 @@
from linien_gui.ui.main_window import MainWindow
from linien_gui.ui.psd_window import PSDWindow
from linien_gui.ui.version_checker import VersionCheckerThread
-from PyQt5 import QtWidgets
-from PyQt5.QtCore import pyqtSignal
+from PyQt6 import QtWidgets
+from PyQt6.QtCore import pyqtSignal
from pyqtgraph.Qt import QtCore
sys.path += [str(UI_PATH)]
diff --git a/linien-gui/linien_gui/dialogs.py b/linien-gui/linien_gui/dialogs.py
index 30ee8c2b..e317c57d 100644
--- a/linien-gui/linien_gui/dialogs.py
+++ b/linien-gui/linien_gui/dialogs.py
@@ -18,8 +18,8 @@
from typing import Callable
from linien_client.device import Device
-from PyQt5.QtCore import pyqtSignal
-from PyQt5.QtWidgets import (
+from PyQt6.QtCore import pyqtSignal
+from PyQt6.QtWidgets import (
QDialog,
QListWidget,
QMessageBox,
diff --git a/linien-gui/linien_gui/threads.py b/linien-gui/linien_gui/threads.py
index bab3963d..2d1a8d7a 100644
--- a/linien-gui/linien_gui/threads.py
+++ b/linien-gui/linien_gui/threads.py
@@ -31,7 +31,7 @@
)
from linien_client.remote_parameters import RemoteParameter
from linien_common.communication import RestorableParameterValues
-from PyQt5.QtCore import QObject, QThread, pyqtSignal
+from PyQt6.QtCore import QObject, QThread, pyqtSignal
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
diff --git a/linien-gui/linien_gui/ui/device_manager.py b/linien-gui/linien_gui/ui/device_manager.py
index 9770595c..b33765fc 100644
--- a/linien-gui/linien_gui/ui/device_manager.py
+++ b/linien-gui/linien_gui/ui/device_manager.py
@@ -34,8 +34,8 @@
from linien_gui.threads import ConnectionThread
from linien_gui.ui.new_device_dialog import NewDeviceDialog
from linien_gui.utils import get_linien_app_instance, set_window_icon
-from PyQt5 import QtCore, QtWidgets, uic
-from PyQt5.QtWidgets import QListWidget, QPushButton
+from PyQt6 import QtCore, QtWidgets, uic
+from PyQt6.QtWidgets import QListWidget, QPushButton
class DeviceManager(QtWidgets.QMainWindow):
diff --git a/linien-gui/linien_gui/ui/general_panel.py b/linien-gui/linien_gui/ui/general_panel.py
index 53ff7ed1..65976bec 100644
--- a/linien-gui/linien_gui/ui/general_panel.py
+++ b/linien-gui/linien_gui/ui/general_panel.py
@@ -25,7 +25,7 @@
from linien_gui.config import UI_PATH
from linien_gui.ui.spin_box import CustomDoubleSpinBoxNoSign
from linien_gui.utils import get_linien_app_instance, param2ui
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
class GeneralPanel(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/ui/lock_status_panel.py b/linien-gui/linien_gui/ui/lock_status_panel.py
index bb11b259..df6dc601 100644
--- a/linien-gui/linien_gui/ui/lock_status_panel.py
+++ b/linien-gui/linien_gui/ui/lock_status_panel.py
@@ -17,7 +17,7 @@
# along with Linien. If not, see .
from linien_gui.utils import get_linien_app_instance, param2ui
-from PyQt5 import QtCore, QtWidgets
+from PyQt6 import QtCore, QtWidgets
class LockStatusPanel(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/ui/locking_panel.py b/linien-gui/linien_gui/ui/locking_panel.py
index 86d8c17a..437d4248 100644
--- a/linien-gui/linien_gui/ui/locking_panel.py
+++ b/linien-gui/linien_gui/ui/locking_panel.py
@@ -21,7 +21,7 @@
from linien_gui.ui.lock_status_panel import LockStatusPanel
from linien_gui.ui.spin_box import CustomSpinBox
from linien_gui.utils import get_linien_app_instance, param2ui
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
class LockingPanel(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/ui/logging_panel.py b/linien-gui/linien_gui/ui/logging_panel.py
index 6256abcd..005b4d6b 100644
--- a/linien-gui/linien_gui/ui/logging_panel.py
+++ b/linien-gui/linien_gui/ui/logging_panel.py
@@ -21,8 +21,8 @@
from linien_common.influxdb import InfluxDBCredentials
from linien_gui.config import UI_PATH
from linien_gui.utils import get_linien_app_instance
-from PyQt5 import QtWidgets, uic
-from PyQt5.QtCore import pyqtSignal
+from PyQt6 import QtWidgets, QtGui, uic
+from PyQt6.QtCore import pyqtSignal
START_LOG_BUTTON_TEXT = "Start Logging"
STOP_LOG_BUTTON_TEXT = "Stop Logging"
@@ -147,11 +147,11 @@ def create_menu_entries(self, parameters: RemoteParameters) -> None:
param_dict = dict(sorted(param_dict.items())) # sort alphabetically
for name, param in param_dict.items():
if param.loggable:
- action = QtWidgets.QAction(name, parent=self, checkable=True) # type: ignore[call-overload] # noqa: E501
+ action = QtGui.QAction(name, parent=self, checkable=True) # type: ignore[call-overload] # noqa: E501
action.setChecked(param.log)
self.addAction(action)
self.triggered.connect(self.on_item_selected)
- def on_item_selected(self, action: QtWidgets.QAction) -> None:
+ def on_item_selected(self, action: QtGui.QAction) -> None:
param_name = action.text()
self.item_clicked.emit(param_name, action.isChecked())
diff --git a/linien-gui/linien_gui/ui/main_window.py b/linien-gui/linien_gui/ui/main_window.py
index 5ca799a2..478f2c20 100644
--- a/linien-gui/linien_gui/ui/main_window.py
+++ b/linien-gui/linien_gui/ui/main_window.py
@@ -30,7 +30,7 @@
from linien_gui.ui.spin_box import CustomDoubleSpinBox
from linien_gui.ui.sweep_control import SweepControlWidget, SweepSlider
from linien_gui.utils import color_to_hex, get_linien_app_instance, set_window_icon
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
ZOOM_STEP = 0.9
MAX_ZOOM = 50
diff --git a/linien-gui/linien_gui/ui/modulation_sweep_panel.py b/linien-gui/linien_gui/ui/modulation_sweep_panel.py
index 4a48b820..2447b3a5 100644
--- a/linien-gui/linien_gui/ui/modulation_sweep_panel.py
+++ b/linien-gui/linien_gui/ui/modulation_sweep_panel.py
@@ -20,7 +20,7 @@
from linien_gui.config import UI_PATH
from linien_gui.ui.spin_box import CustomDoubleSpinBoxNoSign
from linien_gui.utils import get_linien_app_instance, param2ui
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
class ModulationAndSweepPanel(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/ui/new_device_dialog.py b/linien-gui/linien_gui/ui/new_device_dialog.py
index 6a8cc977..eb3e84b7 100644
--- a/linien-gui/linien_gui/ui/new_device_dialog.py
+++ b/linien-gui/linien_gui/ui/new_device_dialog.py
@@ -20,7 +20,7 @@
from linien_client.device import Device, add_device, update_device
from linien_gui.config import UI_PATH
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
class NewDeviceDialog(QtWidgets.QDialog):
diff --git a/linien-gui/linien_gui/ui/optimization_panel.py b/linien-gui/linien_gui/ui/optimization_panel.py
index 740927ed..cedc30b9 100644
--- a/linien-gui/linien_gui/ui/optimization_panel.py
+++ b/linien-gui/linien_gui/ui/optimization_panel.py
@@ -20,7 +20,7 @@
from linien_gui.config import UI_PATH
from linien_gui.ui.spin_box import CustomDoubleSpinBoxNoSign
from linien_gui.utils import get_linien_app_instance, param2ui
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
class OptimizationPanel(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/ui/plot_widget.py b/linien-gui/linien_gui/ui/plot_widget.py
index ee7d7b16..2e34f0ed 100644
--- a/linien-gui/linien_gui/ui/plot_widget.py
+++ b/linien-gui/linien_gui/ui/plot_widget.py
@@ -34,8 +34,8 @@
)
from linien_gui.config import DEFAULT_PLOT_RATE_LIMIT, N_COLORS, Color
from linien_gui.utils import get_linien_app_instance
-from PyQt5 import QtGui, QtWidgets
-from PyQt5.QtCore import pyqtSignal
+from PyQt6 import QtGui, QtWidgets
+from PyQt6.QtCore import pyqtSignal
from pyqtgraph.Qt import QtCore
# NOTE: this is required for using a pen_width > 1. There is a bug though that causes
diff --git a/linien-gui/linien_gui/ui/psd_table_widget.py b/linien-gui/linien_gui/ui/psd_table_widget.py
index 48d99eeb..2b490902 100644
--- a/linien-gui/linien_gui/ui/psd_table_widget.py
+++ b/linien-gui/linien_gui/ui/psd_table_widget.py
@@ -19,8 +19,8 @@
from datetime import datetime
from linien_gui.utils import color_to_hex, get_linien_app_instance
-from PyQt5 import QtCore, QtWidgets
-from PyQt5.QtCore import pyqtSignal
+from PyQt6 import QtCore, QtWidgets
+from PyQt6.QtCore import pyqtSignal
class PSDTableWidget(QtWidgets.QTableWidget):
diff --git a/linien-gui/linien_gui/ui/psd_window.py b/linien-gui/linien_gui/ui/psd_window.py
index dea1dc7e..3110102a 100644
--- a/linien-gui/linien_gui/ui/psd_window.py
+++ b/linien-gui/linien_gui/ui/psd_window.py
@@ -29,7 +29,7 @@
param2ui,
set_window_icon,
)
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
class PSDWindow(QtWidgets.QMainWindow):
diff --git a/linien-gui/linien_gui/ui/right_panel.py b/linien-gui/linien_gui/ui/right_panel.py
index 4dc4f707..9fe7b85f 100644
--- a/linien-gui/linien_gui/ui/right_panel.py
+++ b/linien-gui/linien_gui/ui/right_panel.py
@@ -17,7 +17,7 @@
# along with Linien. If not, see .
from linien_gui.utils import get_linien_app_instance
-from PyQt5 import QtCore, QtWidgets
+from PyQt6 import QtCore, QtWidgets
class RightPanel(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/ui/spectroscopy_panel.py b/linien-gui/linien_gui/ui/spectroscopy_panel.py
index b4c76aa3..475dcd98 100644
--- a/linien-gui/linien_gui/ui/spectroscopy_panel.py
+++ b/linien-gui/linien_gui/ui/spectroscopy_panel.py
@@ -23,7 +23,7 @@
from linien_gui.config import UI_PATH
from linien_gui.ui.spin_box import CustomDoubleSpinBox, CustomDoubleSpinBoxNoSign
from linien_gui.utils import get_linien_app_instance, param2ui
-from PyQt5 import QtWidgets, uic
+from PyQt6 import QtWidgets, uic
class SpectroscopyPanel(QtWidgets.QWidget):
@@ -36,8 +36,8 @@ class SpectroscopyPanel(QtWidgets.QWidget):
manualFilterWidget: QtWidgets.QWidget
signalOffsetSpinBox: CustomDoubleSpinBox
- def __init__(self, *args):
- super(SpectroscopyPanel, self).__init__(*args)
+ def __init__(self, *args, **kwargs):
+ super(SpectroscopyPanel, self).__init__(*args, **kwargs)
uic.loadUi(UI_PATH / "spectroscopy_panel.ui", self)
self.app = get_linien_app_instance()
self.app.connection_established.connect(self.on_connection_established)
diff --git a/linien-gui/linien_gui/ui/spin_box.py b/linien-gui/linien_gui/ui/spin_box.py
index f2884d9a..52fba206 100644
--- a/linien-gui/linien_gui/ui/spin_box.py
+++ b/linien-gui/linien_gui/ui/spin_box.py
@@ -15,7 +15,7 @@
# You should have received a copy of the GNU General Public License
# along with Linien. If not, see .
-from PyQt5.QtWidgets import QDoubleSpinBox, QSpinBox
+from PyQt6.QtWidgets import QDoubleSpinBox, QSpinBox
class CustomDoubleSpinBox(QDoubleSpinBox):
diff --git a/linien-gui/linien_gui/ui/sweep_control.py b/linien-gui/linien_gui/ui/sweep_control.py
index 61f41122..cd9088a5 100644
--- a/linien-gui/linien_gui/ui/sweep_control.py
+++ b/linien-gui/linien_gui/ui/sweep_control.py
@@ -17,7 +17,7 @@
import superqt
from linien_gui.utils import get_linien_app_instance
-from PyQt5 import QtCore, QtWidgets
+from PyQt6 import QtCore, QtWidgets
class SweepControlWidget(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/ui/version_checker.py b/linien-gui/linien_gui/ui/version_checker.py
index fa4bfa7d..00f53c40 100644
--- a/linien-gui/linien_gui/ui/version_checker.py
+++ b/linien-gui/linien_gui/ui/version_checker.py
@@ -21,7 +21,7 @@
import linien_gui
import requests
from packaging import version
-from PyQt5.QtCore import QThread, pyqtSignal
+from PyQt6.QtCore import QThread, pyqtSignal
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
diff --git a/linien-gui/linien_gui/ui/view_panel.py b/linien-gui/linien_gui/ui/view_panel.py
index d39d3857..d9ec31a9 100644
--- a/linien-gui/linien_gui/ui/view_panel.py
+++ b/linien-gui/linien_gui/ui/view_panel.py
@@ -24,7 +24,7 @@
from linien_gui.config import N_COLORS, UI_PATH
from linien_gui.ui.spin_box import CustomDoubleSpinBoxNoSign, CustomSpinBox
from linien_gui.utils import color_to_hex, get_linien_app_instance, param2ui
-from PyQt5 import QtGui, QtWidgets, uic
+from PyQt6 import QtGui, QtWidgets, uic
class ViewPanel(QtWidgets.QWidget):
diff --git a/linien-gui/linien_gui/utils.py b/linien-gui/linien_gui/utils.py
index 1e4bd360..1928850b 100644
--- a/linien-gui/linien_gui/utils.py
+++ b/linien-gui/linien_gui/utils.py
@@ -20,8 +20,8 @@
from typing import TYPE_CHECKING, Any, Callable, Tuple
from linien_client.remote_parameters import RemoteParameter
-from PyQt5 import QtWidgets
-from PyQt5.QtWidgets import (
+from PyQt6 import QtWidgets
+from PyQt6.QtWidgets import (
QCheckBox,
QComboBox,
QDoubleSpinBox,
diff --git a/linien-gui/pkg.nix b/linien-gui/pkg.nix
index 9c1e8610..de020c18 100644
--- a/linien-gui/pkg.nix
+++ b/linien-gui/pkg.nix
@@ -5,11 +5,11 @@
, setuptools
, requests
, pyqtgraph
-, pyqt5
+, pyqt6
, superqt
, click
, linien-client
-, qt5
+, qt6
, makeDesktopItem
, copyDesktopItems
, graphicsmagick
@@ -24,20 +24,20 @@ buildPythonPackage rec {
nativeBuildInputs = [
setuptools
- qt5.wrapQtAppsHook
+ qt6.wrapQtAppsHook
copyDesktopItems
graphicsmagick
];
buildInputs = [
- qt5.qtbase
- qt5.qtwayland
+ qt6.qtbase
+ qt6.qtwayland
];
propagatedBuildInputs = [
requests
pyqtgraph
- pyqt5
+ pyqt6
superqt
click
linien-client
diff --git a/linien-gui/pyinstaller.spec b/linien-gui/pyinstaller.spec
index 6f12fb9a..941ce32c 100644
--- a/linien-gui/pyinstaller.spec
+++ b/linien-gui/pyinstaller.spec
@@ -11,7 +11,7 @@ a = Analysis(
pathex=[],
binaries=[],
datas=datas,
- hiddenimports=["PyQt5.sip", "superqt", "scipy.special._cdflib"],
+ hiddenimports=["PyQt6.sip", "superqt", "scipy.special._cdflib"],
hookspath=[],
runtime_hooks=[],
excludes=[],
diff --git a/linien-gui/pyproject.toml b/linien-gui/pyproject.toml
index f93b0e8b..bced3b5b 100644
--- a/linien-gui/pyproject.toml
+++ b/linien-gui/pyproject.toml
@@ -25,7 +25,7 @@ requires-python = ">=3.8"
dependencies = [
"click>=8.1.7,<9.0",
"pyqtgraph>=0.10.0",
- "PyQt5>=5.12.0,<6.0",
+ "PyQt6<7.0",
"requests>=2.31.0,<3.0",
"superqt>=0.2.3",
"linien_client==2.0.4",