From 6c11a0536c04da411bff2f4171a6bc86a1c2dfe9 Mon Sep 17 00:00:00 2001 From: atse Date: Wed, 19 Jul 2023 15:04:12 +0800 Subject: [PATCH] Arrange context menu items to be in order --- pytec/tec_qt.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pytec/tec_qt.py b/pytec/tec_qt.py index a044b81..8f82881 100644 --- a/pytec/tec_qt.py +++ b/pytec/tec_qt.py @@ -98,16 +98,16 @@ class MainWindow(QtWidgets.QMainWindow, Ui_MainWindow): self.menu = QtWidgets.QMenu() self.menu.setTitle('Thermostat settings') - fan = QtWidgets.QWidgetAction(self.menu) - fan.setDefaultWidget(self.fan_group) - self.menu.addAction(fan) - self.menu.fan = fan - port = QtWidgets.QWidgetAction(self.menu) port.setDefaultWidget(self.port_set_spin) self.menu.addAction(port) self.menu.port = port + fan = QtWidgets.QWidgetAction(self.menu) + fan.setDefaultWidget(self.fan_group) + self.menu.addAction(fan) + self.menu.fan = fan + self.thermostat_settings.setMenu(self.menu) async def _on_connection_changed(self, result):