Arrange context menu items to be in order

This commit is contained in:
atse 2023-07-19 15:04:12 +08:00
parent e5b0583a91
commit 6c11a0536c

View File

@ -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):