From 4c5f0ca83cc5c5f5f9ad6d82ffb88039d4cec5a0 Mon Sep 17 00:00:00 2001 From: Arne Schwabe Date: Wed, 13 Sep 2017 14:17:41 +0200 Subject: [PATCH] Let other python Qt scripts also fallback to Qt5 --- radio/util/font2png.py | 6 +++++- radio/util/taranisicons.py | 6 ++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/radio/util/font2png.py b/radio/util/font2png.py index 079c5ab26..b047e8a11 100755 --- a/radio/util/font2png.py +++ b/radio/util/font2png.py @@ -2,7 +2,11 @@ # -*- coding: utf-8 -*- import sys -from PyQt4 import Qt, QtCore, QtGui +try: + from PyQt5 import Qt, QtGui, QtCore +except: + from PyQt4 import Qt, QtGui, QtCore + import glob app = Qt.QApplication(sys.argv) diff --git a/radio/util/taranisicons.py b/radio/util/taranisicons.py index fc26296e1..d96abccad 100755 --- a/radio/util/taranisicons.py +++ b/radio/util/taranisicons.py @@ -1,7 +1,9 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- - -from PyQt4 import Qt, QtGui +try: + from PyQt5 import Qt, QtGui +except: + from PyQt4 import Qt, QtGui menu = ["radio_setup", "model_select", "model_settings", "model_checklist", "files", "version"]