From b8a96ada1fdbc5f65fb8fc41615af750878bd3c6 Mon Sep 17 00:00:00 2001 From: Abhilash Raj Date: Mon, 31 May 2021 21:39:29 -0700 Subject: [PATCH] Fix the about dialog. --- qweechat/qweechat.py | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) diff --git a/qweechat/qweechat.py b/qweechat/qweechat.py index 5e14bbc..0b38226 100644 --- a/qweechat/qweechat.py +++ b/qweechat/qweechat.py @@ -255,8 +255,7 @@ class MainWindow(QtWidgets.QMainWindow): '© 2011-2020 %s <%s>' % (AUTHOR, AUTHOR_MAIL, AUTHOR_MAIL), '', - 'Running with %s' % ('PySide' if qt_compat.uses_pyside - else 'PyQt4'), + 'Running with PySide6', '', 'WeeChat site: %s' % (WEECHAT_SITE, WEECHAT_SITE), @@ -554,11 +553,15 @@ class MainWindow(QtWidgets.QMainWindow): config.write(self.config) QtWidgets.QMainWindow.closeEvent(self, event) +def main(): + app = QApplication(sys.argv) + app.setStyle(QtWidgets.QStyleFactory.create('Cleanlooks')) + app.setWindowIcon(QtGui.QIcon( + resource_filename(__name__, 'data/icons/weechat.png'))) + main = MainWindow() + main.show() + sys.exit(app.exec_()) -app = QApplication(sys.argv) -app.setStyle(QtWidgets.QStyleFactory.create('Cleanlooks')) -app.setWindowIcon(QtGui.QIcon( - resource_filename(__name__, 'data/icons/weechat.png'))) -main = MainWindow() -main.show() -sys.exit(app.exec_()) + +if __name__ == '__main__': + main()