commit-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Commit-gnuradio] [gnuradio] 04/08: grc: Generate Python scripts that us


From: git
Subject: [Commit-gnuradio] [gnuradio] 04/08: grc: Generate Python scripts that use PyQt5
Date: Sat, 28 Nov 2015 21:28:41 +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 a0ac5513be8f215694ff8a486889599374ea9c22
Author: Paul Cercueil <address@hidden>
Date:   Tue Sep 29 13:22:46 2015 +0200

    grc: Generate Python scripts that use PyQt5
    
    Signed-off-by: Paul Cercueil <address@hidden>
---
 grc/blocks/options.xml     | 2 +-
 grc/python/flow_graph.tmpl | 8 ++------
 2 files changed, 3 insertions(+), 7 deletions(-)

diff --git a/grc/blocks/options.xml b/grc/blocks/options.xml
index 09cc74d..0f6421f 100644
--- a/grc/blocks/options.xml
+++ b/grc/blocks/options.xml
@@ -16,7 +16,7 @@ from grc_gnuradio import wxgui as grc_wxgui
 import wx
 #end if
 #if $generate_options() == 'qt_gui'
-from PyQt4 import Qt
+from PyQt5 import Qt
 import sys
 #end if
 #if not $generate_options().startswith('hb')
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 35d9239..1bebdcd 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -114,7 +114,7 @@ class $(class_name)(gr.top_block, Qt.QWidget):
         self.top_layout.addLayout(self.top_grid_layout)
 
         self.settings = Qt.QSettings("GNU Radio", "$class_name")
-        self.restoreGeometry(self.settings.value("geometry").toByteArray())
+        self.restoreGeometry(self.settings.value("geometry"))
 #elif $generate_options == 'no_gui'
 
 class $(class_name)(gr.top_block):
@@ -368,10 +368,6 @@ def main(top_block_cls=$(class_name), options=None):
     tb.Wait()
         #end if
     #elif $generate_options == 'qt_gui'
-    from distutils.version import StrictVersion
-    if StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0"):
-        style = gr.prefs().get_string('qtgui', 'style', 'raster')
-        Qt.QApplication.setGraphicsSystem(style)
     qapp = Qt.QApplication(sys.argv)
 
     tb = top_block_cls($(', '.join($params_eq_list)))
@@ -390,7 +386,7 @@ def main(top_block_cls=$(class_name), options=None):
     def quitting():
         tb.stop()
         tb.wait()
-    qapp.connect(qapp, Qt.SIGNAL("aboutToQuit()"), quitting)
+    qapp.aboutToQuit.connect(quitting)
         #for $m in $monitors
     if $m.has_param('en'):
         if $m.get_param('en').get_value():



reply via email to

[Prev in Thread] Current Thread [Next in Thread]