diff options
author | Sebastian Koslowski <koslowski@kit.edu> | 2016-09-12 14:16:50 -0600 |
---|---|---|
committer | Sebastian Koslowski <koslowski@kit.edu> | 2016-09-12 14:19:29 -0600 |
commit | f7cdfff6a85ce52b1d7c0b5131645fcb77405fe8 (patch) | |
tree | 908af9bf8d1c512e22116cb3afbc89eb5883cc93 /gr-qtgui/examples/pyqt_time_raster_f.py | |
parent | a867a290194228d09ba93f0f46e3a4e4523f5396 (diff) | |
parent | af4323d1e471476efa255e3df745397f7c8a1b71 (diff) |
Merge remote-tracking branch 'upstream/next' into gtk3
Diffstat (limited to 'gr-qtgui/examples/pyqt_time_raster_f.py')
-rwxr-xr-x | gr-qtgui/examples/pyqt_time_raster_f.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/gr-qtgui/examples/pyqt_time_raster_f.py b/gr-qtgui/examples/pyqt_time_raster_f.py index c5261520db..0f9de94bcb 100755 --- a/gr-qtgui/examples/pyqt_time_raster_f.py +++ b/gr-qtgui/examples/pyqt_time_raster_f.py @@ -1,6 +1,6 @@ #!/usr/bin/env python # -# Copyright 2012,2013 Free Software Foundation, Inc. +# Copyright 2012,2013,2015 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -26,18 +26,18 @@ import sys try: from gnuradio import qtgui - from PyQt4 import QtGui, QtCore + from PyQt5 import QtWidgets, Qt import sip except ImportError: - print "Error: Program requires PyQt4 and gr-qtgui." + print "Error: Program requires PyQt5 and gr-qtgui." sys.exit(1) -class dialog_box(QtGui.QWidget): +class dialog_box(QtWidgets.QWidget): def __init__(self, display): - QtGui.QWidget.__init__(self, None) + QtWidgets.QWidget.__init__(self, None) self.setWindowTitle('PyQt Test GUI') - self.boxlayout = QtGui.QBoxLayout(QtGui.QBoxLayout.LeftToRight, self) + self.boxlayout = QtWidgets.QBoxLayout(QtWidgets.QBoxLayout.LeftToRight, self) self.boxlayout.addWidget(display, 1) self.resize(800, 500) @@ -46,7 +46,7 @@ class my_top_block(gr.top_block): def __init__(self): gr.top_block.__init__(self) - self.qapp = QtGui.QApplication(sys.argv) + self.qapp = QtWidgets.QApplication(sys.argv) data0 = 10*[0,] + 40*[1,0] + 10*[0,] data0 += 10*[0,] + 40*[0,1] + 10*[0,] @@ -72,8 +72,8 @@ class my_top_block(gr.top_block): pyQt = self.snk1.pyqwidget() # Wrap the pointer as a PyQt SIP object - # This can now be manipulated as a PyQt4.QtGui.QWidget - pyWin = sip.wrapinstance(pyQt, QtGui.QWidget) + # This can now be manipulated as a PyQt5.QtWidgets.QWidget + pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget) self.main_box = dialog_box(pyWin) self.main_box.show() @@ -83,4 +83,3 @@ if __name__ == "__main__": tb.start() tb.qapp.exec_() tb.stop() - |