summaryrefslogtreecommitdiff
path: root/grc/python
diff options
context:
space:
mode:
authorTom Rondeau <tom@trondeau.com>2014-07-25 17:59:31 -0400
committerTom Rondeau <tom@trondeau.com>2014-07-25 17:59:31 -0400
commit1fa94d7a10089b3907ffe428e9d374f442f0f596 (patch)
treedee7ffaa643981f1b795df553ea8f110c4a5457d /grc/python
parent404e131f66b7a7749cf6ccce6d64efe28aa2aeed (diff)
qtgui: bringing in line with required Qt 4.4.
setGraphicsSystem was introduced in 4.5; doing a version check before its use.
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')