]> jfr.im git - irc/weechat/qweechat.git/blobdiff - qweechat/connection.py
Remove "Running with PySide6" from about dialog
[irc/weechat/qweechat.git] / qweechat / connection.py
index 6c0c99631bdc3d1e9a60c2e45869a6fa746608a4..c1107f2e4516b838e5037d05f98407a577bad9e9 100644 (file)
@@ -2,7 +2,7 @@
 #
 # connection.py - connection window
 #
-# Copyright (C) 2011-2019 Sébastien Helleu <flashcode@flashtux.org>
+# Copyright (C) 2011-2021 Sébastien Helleu <flashcode@flashtux.org>
 #
 # This file is part of QWeeChat, a Qt remote GUI for WeeChat.
 #
 # along with QWeeChat.  If not, see <http://www.gnu.org/licenses/>.
 #
 
-import qt_compat
+from PySide6 import QtGui, QtWidgets
 
-QtGui = qt_compat.import_module('QtGui')
 
-
-class ConnectionDialog(QtGui.QDialog):
+class ConnectionDialog(QtWidgets.QDialog):
     """Connection window."""
 
     def __init__(self, values, *args):
-        QtGui.QDialog.__init__(*(self,) + args)
+        super().__init__(*args)
         self.values = values
         self.setModal(True)
 
-        grid = QtGui.QGridLayout()
+        grid = QtWidgets.QGridLayout()
         grid.setSpacing(10)
 
         self.fields = {}
         for line, field in enumerate(('server', 'port', 'password', 'lines')):
-            grid.addWidget(QtGui.QLabel(field.capitalize()), line, 0)
-            line_edit = QtGui.QLineEdit()
+            grid.addWidget(QtWidgets.QLabel(field.capitalize()), line, 0)
+            line_edit = QtWidgets.QLineEdit()
             line_edit.setFixedWidth(200)
             if field == 'password':
-                line_edit.setEchoMode(QtGui.QLineEdit.Password)
+                line_edit.setEchoMode(QtWidgets.QLineEdit.Password)
             if field == 'lines':
                 validator = QtGui.QIntValidator(0, 2147483647, self)
                 line_edit.setValidator(validator)
@@ -51,14 +49,14 @@ class ConnectionDialog(QtGui.QDialog):
             grid.addWidget(line_edit, line, 1)
             self.fields[field] = line_edit
             if field == 'port':
-                ssl = QtGui.QCheckBox('SSL')
+                ssl = QtWidgets.QCheckBox('SSL')
                 ssl.setChecked(self.values['ssl'] == 'on')
                 grid.addWidget(ssl, line, 2)
                 self.fields['ssl'] = ssl
 
-        self.dialog_buttons = QtGui.QDialogButtonBox()
+        self.dialog_buttons = QtWidgets.QDialogButtonBox()
         self.dialog_buttons.setStandardButtons(
-            QtGui.QDialogButtonBox.Ok | QtGui.QDialogButtonBox.Cancel)
+            QtWidgets.QDialogButtonBox.Ok | QtWidgets.QDialogButtonBox.Cancel)
         self.dialog_buttons.rejected.connect(self.close)
 
         grid.addWidget(self.dialog_buttons, 4, 0, 1, 2)