7 Module implementing a dialog to show the WiFi status of the connected device. |
7 Module implementing a dialog to show the WiFi status of the connected device. |
8 """ |
8 """ |
9 |
9 |
10 import contextlib |
10 import contextlib |
11 |
11 |
12 from PyQt6.QtWidgets import QDialog, QTreeWidgetItem |
12 from PyQt6.QtCore import Qt |
|
13 from PyQt6.QtWidgets import QDialog, QDialogButtonBox, QTreeWidgetItem |
13 |
14 |
14 from .Ui_WifiStatusDialog import Ui_WifiStatusDialog |
15 from .Ui_WifiStatusDialog import Ui_WifiStatusDialog |
15 |
16 |
16 |
17 |
17 class WifiStatusDialog(QDialog, Ui_WifiStatusDialog): |
18 class WifiStatusDialog(QDialog, Ui_WifiStatusDialog): |
178 ) |
179 ) |
179 |
180 |
180 for col in range(self.statusTree.columnCount()): |
181 for col in range(self.statusTree.columnCount()): |
181 self.statusTree.resizeColumnToContents(col) |
182 self.statusTree.resizeColumnToContents(col) |
182 |
183 |
|
184 self.buttonBox.button(QDialogButtonBox.StandardButton.Close).setDefault(True) |
|
185 self.buttonBox.setFocus(Qt.FocusReason.OtherFocusReason) |
|
186 |
183 def __createHeader(self, headerText): |
187 def __createHeader(self, headerText): |
184 """ |
188 """ |
185 Private method to create a header item. |
189 Private method to create a header item. |
186 |
190 |
187 @param headerText text for the header item |
191 @param headerText text for the header item |