[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Commit-gnuradio] [gnuradio] 05/09: gr-qtgui: Fix range.py to work with
From: |
git |
Subject: |
[Commit-gnuradio] [gnuradio] 05/09: gr-qtgui: Fix range.py to work with both Qt4 and Qt5 |
Date: |
Wed, 22 Jun 2016 21:19:31 +0000 (UTC) |
This is an automated email from the git hooks/post-receive script.
jcorgan pushed a commit to branch next-qt5
in repository gnuradio.
commit fef76c211cbe6a6c7c0645c181d27635971d841b
Author: Paul Cercueil <address@hidden>
Date: Tue Jun 21 18:16:06 2016 +0200
gr-qtgui: Fix range.py to work with both Qt4 and Qt5
Signed-off-by: Paul Cercueil <address@hidden>
---
gr-qtgui/python/qtgui/CMakeLists.txt | 10 +++++++++-
gr-qtgui/python/qtgui/{range.py => range.py.cmakein} | 3 +--
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/gr-qtgui/python/qtgui/CMakeLists.txt
b/gr-qtgui/python/qtgui/CMakeLists.txt
index 4fa4d0f..e1a07fd 100644
--- a/gr-qtgui/python/qtgui/CMakeLists.txt
+++ b/gr-qtgui/python/qtgui/CMakeLists.txt
@@ -20,9 +20,17 @@
########################################################################
include(GrPython)
+if (DESIRED_QT_VERSION MATCHES 4)
+ set(PY_QT_IMPORT "from PyQt4 import Qt, QtCore, QtGui as QtWidgets")
+else()
+ set(PY_QT_IMPORT "from PyQt5 import Qt, QtCore, QtWidgets")
+endif()
+
+configure_file(range.py.cmakein "${CMAKE_CURRENT_BINARY_DIR}/range.py" @ONLY)
+
GR_PYTHON_INSTALL(
FILES __init__.py
- range.py
+ "${CMAKE_CURRENT_BINARY_DIR}/range.py"
DESTINATION ${GR_PYTHON_DIR}/gnuradio/qtgui
COMPONENT "qtgui_python"
)
diff --git a/gr-qtgui/python/qtgui/range.py
b/gr-qtgui/python/qtgui/range.py.cmakein
similarity index 99%
rename from gr-qtgui/python/qtgui/range.py
rename to gr-qtgui/python/qtgui/range.py.cmakein
index c04ef75..45aa762 100755
--- a/gr-qtgui/python/qtgui/range.py
+++ b/gr-qtgui/python/qtgui/range.py.cmakein
@@ -21,8 +21,7 @@
# Boston, MA 02110-1301, USA.
#
-from PyQt5 import Qt, QtCore, QtWidgets
-
address@hidden@
class Range(object):
def __init__(self, minv, maxv, step, default, min_length):
- [Commit-gnuradio] [gnuradio] branch next-qt5 updated (3c14957 -> cc57ff6), git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 03/09: cmake: FindQwt: Find the Qwt library that matches the Qt version, git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 05/09: gr-qtgui: Fix range.py to work with both Qt4 and Qt5,
git <=
- [Commit-gnuradio] [gnuradio] 09/09: Merge branch 'adi-qt5' into next-qt5, git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 06/09: gr-qtgui: Re-introduce some Qt4-specific code, git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 07/09: grc: Fix generation of Python code for Qt4 and Qt5, git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 01/09: Revert "CMake: Remove obsolete GrSetupQt4 module", git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 04/09: gr-qtgui: Fix PyQt[4, 5] include in XMLs for GRC, git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 08/09: qtgui: tolerate return of NoneType when setting not found, git, 2016/06/22
- [Commit-gnuradio] [gnuradio] 02/09: gr-qtgui: Allow build with Qt4 or Qt5 (default), git, 2016/06/22