summaryrefslogtreecommitdiff
path: root/grc/python
diff options
context:
space:
mode:
Diffstat (limited to 'grc/python')
-rw-r--r--grc/python/flow_graph.tmpl4
1 files changed, 3 insertions, 1 deletions
diff --git a/grc/python/flow_graph.tmpl b/grc/python/flow_graph.tmpl
index 52582384aa..ace217c967 100644
--- a/grc/python/flow_graph.tmpl
+++ b/grc/python/flow_graph.tmpl
@@ -58,6 +58,7 @@ class $(class_name)(grc_wxgui.top_block_gui):
self.SetIcon(wx.Icon(_icon_path, wx.BITMAP_TYPE_ANY))
#end if
#elif $generate_options == 'qt_gui'
+from distutils.version import StrictVersion
class $(class_name)(gr.top_block, Qt.QWidget):
def __init__($param_str):
@@ -316,7 +317,8 @@ if __name__ == '__main__':
tb.Wait()
#end if
#elif $generate_options == 'qt_gui'
- Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster'))
+ if(StrictVersion(Qt.qVersion()) >= StrictVersion("4.5.0")):
+ Qt.QApplication.setGraphicsSystem(gr.prefs().get_string('qtgui','style','raster'))
qapp = Qt.QApplication(sys.argv)
tb = $(class_name)($(', '.join($params_eq_list)))
#if $flow_graph.get_option('run')