Package: gnuradio / 3.7.13.4-4

qt5-maint-0019-qtgui-fixed-apps-for-Qt5-compatibility.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
2044
2045
2046
2047
2048
2049
2050
2051
2052
2053
2054
2055
2056
2057
2058
2059
2060
2061
2062
2063
2064
2065
2066
2067
2068
2069
2070
2071
2072
2073
2074
2075
2076
2077
2078
2079
2080
2081
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096
2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111
2112
2113
2114
2115
2116
2117
2118
2119
2120
2121
2122
2123
2124
2125
2126
2127
2128
2129
2130
2131
2132
2133
2134
2135
2136
2137
2138
2139
2140
2141
2142
2143
2144
2145
2146
2147
2148
2149
2150
2151
2152
2153
2154
2155
2156
2157
2158
2159
2160
2161
2162
2163
2164
2165
2166
2167
2168
2169
2170
2171
2172
2173
2174
2175
2176
2177
2178
2179
2180
2181
2182
2183
2184
2185
2186
2187
2188
2189
2190
2191
2192
2193
2194
2195
2196
2197
2198
2199
2200
2201
2202
2203
2204
2205
2206
2207
2208
2209
2210
2211
2212
2213
2214
2215
2216
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
2249
2250
2251
2252
2253
2254
2255
2256
2257
2258
2259
2260
2261
2262
2263
2264
2265
2266
2267
2268
2269
2270
2271
2272
2273
2274
2275
2276
2277
2278
2279
2280
2281
2282
2283
2284
2285
2286
2287
2288
2289
2290
2291
2292
2293
2294
2295
2296
2297
2298
2299
2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
2330
2331
2332
2333
2334
2335
2336
2337
2338
2339
2340
2341
2342
2343
2344
2345
2346
2347
2348
2349
2350
2351
2352
2353
2354
2355
2356
2357
2358
2359
2360
2361
2362
2363
2364
2365
2366
2367
2368
2369
2370
2371
2372
2373
2374
2375
2376
2377
2378
2379
2380
2381
2382
From 2cf36532281caf6cf7ee54d92b3f22537819e012 Mon Sep 17 00:00:00 2001
From: "A. Maitland Bottoms" <bottoms@debian.org>
Date: Sun, 25 Feb 2018 13:25:55 -0500
Subject: [PATCH 19/22] qtgui fixed apps for Qt5 compatibility

---
 gr-qtgui/apps/gr_constellation_plot      |  12 +--
 gr-qtgui/apps/gr_psd_plot_b              |   7 +-
 gr-qtgui/apps/gr_psd_plot_c              |   7 +-
 gr-qtgui/apps/gr_psd_plot_f              |   7 +-
 gr-qtgui/apps/gr_psd_plot_i              |   7 +-
 gr-qtgui/apps/gr_psd_plot_s              |   7 +-
 gr-qtgui/apps/gr_spectrogram_plot        |   6 +-
 gr-qtgui/apps/gr_spectrogram_plot_b      |   7 +-
 gr-qtgui/apps/gr_spectrogram_plot_c      |   7 +-
 gr-qtgui/apps/gr_spectrogram_plot_f      |   7 +-
 gr-qtgui/apps/gr_spectrogram_plot_i      |   7 +-
 gr-qtgui/apps/gr_spectrogram_plot_s      |   7 +-
 gr-qtgui/apps/gr_time_plot_b             |   7 +-
 gr-qtgui/apps/gr_time_plot_c             |   7 +-
 gr-qtgui/apps/gr_time_plot_f             |   7 +-
 gr-qtgui/apps/gr_time_plot_i             |   7 +-
 gr-qtgui/apps/gr_time_plot_s             |   7 +-
 gr-qtgui/apps/gr_time_raster_b           |   7 +-
 gr-qtgui/apps/gr_time_raster_f           |   7 +-
 gr-qtgui/apps/plot_base.py               |   8 +-
 gr-qtgui/apps/plot_constellation_form.py |  16 +--
 gr-qtgui/apps/plot_form.py               | 160 +++++++++++++---------------
 gr-qtgui/apps/plot_psd_base.py           |  12 +--
 gr-qtgui/apps/plot_psd_form.py           |  34 +++---
 gr-qtgui/apps/plot_spectrogram_base.py   |  12 +--
 gr-qtgui/apps/plot_spectrogram_form.py   |  67 ++++++------
 gr-qtgui/apps/plot_time_base.py          |  12 +--
 gr-qtgui/apps/plot_time_form.py          |  21 ++--
 gr-qtgui/apps/plot_time_raster_base.py   |  14 +--
 gr-qtgui/apps/plot_time_raster_form.py   |  60 +++++------
 gr-qtgui/apps/qt_digital.py              |  58 +++++------
 gr-qtgui/apps/qt_digital_window.py       | 148 +++++++++++++-------------
 gr-qtgui/apps/uhd_display.py             |  58 +++++------
 gr-qtgui/apps/usrp_display_qtgui.py      | 172 +++++++++++++++----------------
 34 files changed, 473 insertions(+), 516 deletions(-)

diff --git a/gr-qtgui/apps/gr_constellation_plot b/gr-qtgui/apps/gr_constellation_plot
index 528bb97e5a..80d02d31ca 100755
--- a/gr-qtgui/apps/gr_constellation_plot
+++ b/gr-qtgui/apps/gr_constellation_plot
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -28,16 +28,16 @@ import os, 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    sys.stderr.write("Error: Scipy required (www.scipy.org).\n")
     sys.exit(1)
 
 try:
@@ -66,7 +66,7 @@ class my_top_block(gr.top_block):
         self._y_value = 2
         self.gui_y_axis = None
 
-        self.qapp = QtGui.QApplication(sys.argv)
+        self.qapp = QtWidgets.QApplication(sys.argv)
 
         self.skip = blocks.skiphead(gr.sizeof_gr_complex, self._start)
         self.gui_snk = qtgui.const_sink_c(self._nsamps, "", self._nsigs)
@@ -98,7 +98,7 @@ class my_top_block(gr.top_block):
 
         # Get Python Qt references
         pyQt  = self.gui_snk.pyqwidget()
-        self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+        self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
 
     def get_gui(self):
         return self.pyWin
diff --git a/gr-qtgui/apps/gr_psd_plot_b b/gr-qtgui/apps/gr_psd_plot_b
index 606311af48..70b9eabe38 100755
--- a/gr-qtgui/apps/gr_psd_plot_b
+++ b/gr-qtgui/apps/gr_psd_plot_b
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class psd_plot_b(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_psd_plot_c b/gr-qtgui/apps/gr_psd_plot_c
index 6df9fae190..7d827ac995 100755
--- a/gr-qtgui/apps/gr_psd_plot_c
+++ b/gr-qtgui/apps/gr_psd_plot_c
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -32,10 +32,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class psd_plot_c(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_psd_plot_f b/gr-qtgui/apps/gr_psd_plot_f
index f07e3e8b50..abb66f013b 100755
--- a/gr-qtgui/apps/gr_psd_plot_f
+++ b/gr-qtgui/apps/gr_psd_plot_f
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -32,10 +32,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.sterr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class psd_plot_f(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_psd_plot_i b/gr-qtgui/apps/gr_psd_plot_i
index 1852345823..17d4970ec2 100755
--- a/gr-qtgui/apps/gr_psd_plot_i
+++ b/gr-qtgui/apps/gr_psd_plot_i
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class psd_plot_i(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_psd_plot_s b/gr-qtgui/apps/gr_psd_plot_s
index c06076f1f9..5f99c70209 100755
--- a/gr-qtgui/apps/gr_psd_plot_s
+++ b/gr-qtgui/apps/gr_psd_plot_s
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class psd_plot_s(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_spectrogram_plot b/gr-qtgui/apps/gr_spectrogram_plot
index db79f9dbad..5f5b8ba431 100755
--- a/gr-qtgui/apps/gr_spectrogram_plot
+++ b/gr-qtgui/apps/gr_spectrogram_plot
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -36,10 +36,10 @@ except ImportError:
 
 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class spectrogram_plot_c(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_spectrogram_plot_b b/gr-qtgui/apps/gr_spectrogram_plot_b
index 0d7a16ea6e..29feaa33f5 100755
--- a/gr-qtgui/apps/gr_spectrogram_plot_b
+++ b/gr-qtgui/apps/gr_spectrogram_plot_b
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class spectrogram_plot_b(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_spectrogram_plot_c b/gr-qtgui/apps/gr_spectrogram_plot_c
index 52b0d4dff7..b5a7686da6 100755
--- a/gr-qtgui/apps/gr_spectrogram_plot_c
+++ b/gr-qtgui/apps/gr_spectrogram_plot_c
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -32,10 +32,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class spectrogram_plot_c(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_spectrogram_plot_f b/gr-qtgui/apps/gr_spectrogram_plot_f
index 6ea5afc4ef..26346945f1 100755
--- a/gr-qtgui/apps/gr_spectrogram_plot_f
+++ b/gr-qtgui/apps/gr_spectrogram_plot_f
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -32,10 +32,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class spectrogram_plot_f(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_spectrogram_plot_i b/gr-qtgui/apps/gr_spectrogram_plot_i
index 893df2a234..693d961d0d 100755
--- a/gr-qtgui/apps/gr_spectrogram_plot_i
+++ b/gr-qtgui/apps/gr_spectrogram_plot_i
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class spectrogram_plot_i(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_spectrogram_plot_s b/gr-qtgui/apps/gr_spectrogram_plot_s
index 82a22f740d..270bacbcaf 100755
--- a/gr-qtgui/apps/gr_spectrogram_plot_s
+++ b/gr-qtgui/apps/gr_spectrogram_plot_s
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class spectrogram_plot_s(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_time_plot_b b/gr-qtgui/apps/gr_time_plot_b
index d822557f1b..ae240561e6 100755
--- a/gr-qtgui/apps/gr_time_plot_b
+++ b/gr-qtgui/apps/gr_time_plot_b
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -30,10 +30,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class plot_time_b(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_time_plot_c b/gr-qtgui/apps/gr_time_plot_c
index 202e0f88f4..af184304d4 100755
--- a/gr-qtgui/apps/gr_time_plot_c
+++ b/gr-qtgui/apps/gr_time_plot_c
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class plot_time_c(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_time_plot_f b/gr-qtgui/apps/gr_time_plot_f
index 8f5ad9f60d..e9892ac302 100755
--- a/gr-qtgui/apps/gr_time_plot_f
+++ b/gr-qtgui/apps/gr_time_plot_f
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class plot_time_f(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_time_plot_i b/gr-qtgui/apps/gr_time_plot_i
index 8a7888b451..be995897c1 100755
--- a/gr-qtgui/apps/gr_time_plot_i
+++ b/gr-qtgui/apps/gr_time_plot_i
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -30,10 +30,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class plot_time_i(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_time_plot_s b/gr-qtgui/apps/gr_time_plot_s
index 7cee262379..7eff341225 100755
--- a/gr-qtgui/apps/gr_time_plot_s
+++ b/gr-qtgui/apps/gr_time_plot_s
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012,2013 Free Software Foundation, Inc.
+# Copyright 2012,2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -30,10 +30,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class plot_time_s(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_time_raster_b b/gr-qtgui/apps/gr_time_raster_b
index ad8691489c..dc361832e6 100755
--- a/gr-qtgui/apps/gr_time_raster_b
+++ b/gr-qtgui/apps/gr_time_raster_b
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class plot_time_raster_b(plot_base.plot_base):
diff --git a/gr-qtgui/apps/gr_time_raster_f b/gr-qtgui/apps/gr_time_raster_f
index 5d6a8389cf..ccd5a79069 100755
--- a/gr-qtgui/apps/gr_time_raster_f
+++ b/gr-qtgui/apps/gr_time_raster_f
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,11 @@ except ImportError:
 
 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 class plot_time_raster_f(plot_base.plot_base):
diff --git a/gr-qtgui/apps/plot_base.py b/gr-qtgui/apps/plot_base.py
index eaab7599c7..a08f460c9c 100644
--- a/gr-qtgui/apps/plot_base.py
+++ b/gr-qtgui/apps/plot_base.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -29,16 +29,16 @@ os.environ['GR_CONF_CONTROLPORT_ON'] = 'False'
 
 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    sys.stderr.write("Error: Scipy required (www.scipy.org).\n")
     sys.exit(1)
 
 try:
diff --git a/gr-qtgui/apps/plot_constellation_form.py b/gr-qtgui/apps/plot_constellation_form.py
index 01c6ed1865..dc62e09f13 100644
--- a/gr-qtgui/apps/plot_constellation_form.py
+++ b/gr-qtgui/apps/plot_constellation_form.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -24,10 +24,11 @@ import sys
 from gnuradio import filter
 
 try:
-    from PyQt4 import QtGui, QtCore
+    from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5.\n")
     sys.exit(1)
 
 try:
@@ -39,8 +40,8 @@ class plot_constellation_form(plot_form):
     def __init__(self, top_block, title='', scale=1):
         plot_form.__init__(self, top_block, title, scale)
 
-        self.right_col_layout = QtGui.QVBoxLayout()
-        self.right_col_form = QtGui.QFormLayout()
+        self.right_col_layout = QtWidgets.QVBoxLayout()
+        self.right_col_form = QtWidgets.QFormLayout()
         self.right_col_layout.addLayout(self.right_col_form)
         self.layout.addLayout(self.right_col_layout, 1,4,1,1)
 
@@ -51,12 +52,11 @@ class plot_constellation_form(plot_form):
         self.ybar.setSingleStep(self._pos_scale*(max(self.top_block._y_range/10, 0.010)))
         self.ybar.setPageStep(self._pos_scale*(max(self.top_block._y_range/2, 0.010)))
 
-        self.auto_scale = QtGui.QCheckBox("Auto Scale", self)
+        self.auto_scale = QtWidgets.QCheckBox("Auto Scale", self)
         if(self.top_block._auto_scale):
             self.auto_scale.setChecked(self.top_block._auto_scale)
         self.set_auto_scale(self.top_block._auto_scale)
-        self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"),
-                     self.set_auto_scale)
+        self.auto_scale.stateChanged.connect(self.set_auto_scale)
         self.right_col_layout.addWidget(self.auto_scale)
 
         self.ybar.setValue(1000*self.top_block._y_value)
diff --git a/gr-qtgui/apps/plot_form.py b/gr-qtgui/apps/plot_form.py
index 931565bd3e..39e3e1a928 100644
--- a/gr-qtgui/apps/plot_form.py
+++ b/gr-qtgui/apps/plot_form.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2012 Free Software Foundation, Inc.
+# Copyright 2012,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -21,17 +21,18 @@
 #
 
 try:
-    from PyQt4 import QtGui, QtCore
+    from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5.\n")
     sys.exit(1)
 
 import numpy
 
-class plot_form(QtGui.QWidget):
+class plot_form(QtWidgets.QWidget):
     def __init__(self, top_block, title='', scale=1):
-        QtGui.QWidget.__init__(self, None)
+        QtWidgets.QWidget.__init__(self, None)
 
         self._start = 0
         self._end = 0
@@ -44,81 +45,73 @@ class plot_form(QtGui.QWidget):
 
         self.setWindowTitle(title)
 
-        self.layout = QtGui.QGridLayout(self)
+        self.layout = QtWidgets.QGridLayout(self)
         self.layout.addWidget(top_block.get_gui(), 1,2,1,2)
 
         # Create a save action
-        self.save_act = QtGui.QAction("Save", self)
-        self.save_act.setShortcut(QtGui.QKeySequence.Save)
-        self.connect(self.save_act, QtCore.SIGNAL("triggered()"),
-                     self.save_figure)
+        self.save_act = QtWidgets.QAction("Save", self)
+        self.save_act.setShortcut(QtWidgets.QKeySequence.Save)
+        self.save_act.triggered.connect(self.save_figure)
 
         # Create an exit action
-        self.exit_act = QtGui.QAction("Exit", self)
-        self.exit_act.setShortcut(QtGui.QKeySequence.Close)
-        self.connect(self.exit_act, QtCore.SIGNAL("triggered()"),
-                     self.close)
+        self.exit_act = QtWidgets.QAction("Exit", self)
+        self.exit_act.setShortcut(QtWidgets.QKeySequence.Close)
+        self.exit_act.triggered.connect(self.close)
 
         # Create a menu for the window
-        self.menu = QtGui.QToolBar("Menu", self)
+        self.menu = QtWidgets.QToolBar("Menu", self)
         self.menu.addAction(self.save_act)
         self.menu.addAction(self.exit_act)
 
         self.layout.addWidget(self.menu, 0,0,1,4)
 
-        self.left_col_form = QtGui.QFormLayout()
+        self.left_col_form = QtWidgets.QFormLayout()
         self.layout.addLayout(self.left_col_form, 1,0,1,1)
         self.layout.setColumnStretch(0, 0)
         self.layout.setColumnStretch(2, 1)
 
         # Create Edit boxes for X-axis start/stop
-        self.size_val = QtGui.QIntValidator(0, top_block._max_nsamps, self)
+        self.size_val = QtWidgets.QIntValidator(0, top_block._max_nsamps, self)
 
-        self.start_edit = QtGui.QLineEdit(self)
+        self.start_edit = QtWidgets.QLineEdit(self)
         self.start_edit.setMinimumWidth(100)
         self.start_edit.setMaximumWidth(100)
-        self.start_edit.setText(QtCore.QString("%1").arg(top_block._start))
+        self.start_edit.setText("{0}".format(top_block._start))
         self.start_edit.setValidator(self.size_val)
         self.left_col_form.addRow("Start:", self.start_edit)
-        self.connect(self.start_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_xaxis_pos)
+        self.start_edit.returnPressed.connect(self.update_xaxis_pos)
 
         end = top_block._start + top_block._nsamps
-        self.end_edit = QtGui.QLineEdit(self)
+        self.end_edit = QtWidgets.QLineEdit(self)
         self.end_edit.setMinimumWidth(100)
         self.end_edit.setMaximumWidth(100)
-        self.end_edit.setText(QtCore.QString("%1").arg(end))
+        self.end_edit.setText("{0}".format(end))
         self.end_edit.setValidator(self.size_val)
         self.left_col_form.addRow("End:", self.end_edit)
-        self.connect(self.end_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_xaxis_pos)
+        self.end_edit.returnPressed.connect(self.update_xaxis_pos)
 
         # Create a slider to move the position in the file
-        self.posbar = QtGui.QSlider(QtCore.Qt.Horizontal, self)
+        self.posbar = QtWidgets.QSlider(Qt.Qt.Horizontal, self)
         self.posbar.setMaximum(self.top_block._max_nsamps)
         self.posbar.setPageStep(self.top_block._nsamps)
-        self.connect(self.posbar, QtCore.SIGNAL("valueChanged(int)"),
-                     self.update_xaxis_slider)
+        self.posbar.valueChanged.connect(self.update_xaxis_slider)
         self.layout.addWidget(self.posbar, 2,2,1,1)
 
         # Create Edit boxes for Y-axis min/max
-        self.y_max_edit = QtGui.QLineEdit(self)
+        self.y_max_edit = QtWidgets.QLineEdit(self)
         self.y_max_edit.setMinimumWidth(100)
         self.y_max_edit.setMaximumWidth(100)
         self.left_col_form.addRow("Y Max:", self.y_max_edit)
-        self.connect(self.y_max_edit, QtCore.SIGNAL("editingFinished()"),
-                     self.update_yaxis_pos)
+        self.y_max_edit.editingFinished.connect(self.update_yaxis_pos)
 
-        self.y_min_edit = QtGui.QLineEdit(self)
+        self.y_min_edit = QtWidgets.QLineEdit(self)
         self.y_min_edit.setMinimumWidth(100)
         self.y_min_edit.setMaximumWidth(100)
         self.left_col_form.addRow("Y Min:", self.y_min_edit)
-        self.connect(self.y_min_edit, QtCore.SIGNAL("editingFinished()"),
-                     self.update_yaxis_pos)
+        self.y_min_edit.editingFinished.connect(self.update_yaxis_pos)
 
-        self.grid_check = QtGui.QCheckBox("Grid", self)
-        self.connect(self.grid_check, QtCore.SIGNAL("stateChanged(int)"),
-                     self.set_grid_check)
+        self.grid_check = QtWidgets.QCheckBox("Grid", self)
+        self.grid_check.stateChanged.connect(self.set_grid_check)
         self.left_col_form.addWidget(self.grid_check)
 
         # Create a slider to move the plot's y-axis offset
@@ -126,42 +119,39 @@ class plot_form(QtGui.QWidget):
         _ymin = numpy.int32(max(numpy.iinfo(numpy.int32).min, self.top_block._y_min))
         _yrng = numpy.int32(min(numpy.iinfo(numpy.int32).max, self.top_block._y_range))
         _yval = numpy.int32(min(numpy.iinfo(numpy.int32).max, self.top_block._y_value))
-        self.ybar = QtGui.QSlider(QtCore.Qt.Vertical, self)
+        self.ybar = QtWidgets.QSlider(Qt.Qt.Vertical, self)
         self.ybar.setMinimum(self._pos_scale*_ymin)
         self.ybar.setMaximum(self._pos_scale*_ymax)
         self.ybar.setSingleStep(self._pos_scale*(_yrng/10))
         self.ybar.setPageStep(self._pos_scale*(_yrng/2))
         self.ybar.setValue(self._pos_scale*_ymax)
-        self.connect(self.ybar, QtCore.SIGNAL("valueChanged(int)"),
-                     self.update_yaxis_slider)
+        self.ybar.valueChanged.connect(self.update_yaxis_slider)
         self.layout.addWidget(self.ybar, 1,1,1,1)
 
         self.gui_y_axis(top_block._y_value-top_block._y_range, top_block._y_value)
 
         # Create an edit box for the Sample Rate
         sr = top_block._samp_rate
-        self.samp_rate_edit = QtGui.QLineEdit(self)
+        self.samp_rate_edit = QtWidgets.QLineEdit(self)
         self.samp_rate_edit.setMinimumWidth(100)
         self.samp_rate_edit.setMaximumWidth(100)
-        self.samp_rate_edit.setText(QtCore.QString("%1").arg(sr))
+        self.samp_rate_edit.setText("{0}".format(sr))
         self.left_col_form.addRow("Sample Rate:", self.samp_rate_edit)
-        self.connect(self.samp_rate_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_samp_rate)
+        self.samp_rate_edit.returnPressed.connect(self.update_samp_rate)
 
         # Create an edit box for the center frequency
         freq = top_block._center_freq
-        self.freq_edit = QtGui.QLineEdit(self)
+        self.freq_edit = QtWidgets.QLineEdit(self)
         self.freq_edit.setMinimumWidth(100)
         self.freq_edit.setMaximumWidth(100)
-        self.freq_edit.setText(QtCore.QString("%1").arg(freq))
+        self.freq_edit.setText("{0}".format(freq))
         self.left_col_form.addRow("Frequency:", self.freq_edit)
-        self.connect(self.freq_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_samp_rate)
+        self.freq_edit.returnPressed.connect(self.update_samp_rate)
 
         self.resize(1000, 500)
 
     def add_line_control(self, layout):
-        self._line_tabs = QtGui.QTabWidget()
+        self._line_tabs = QtWidgets.QTabWidget()
 
         self._line_pages = []
         self._line_forms = []
@@ -172,51 +162,46 @@ class plot_form(QtGui.QWidget):
         self._marker_edit = []
         self._alpha_edit = []
         for n in xrange(self.top_block._nsigs):
-            self._line_pages.append(QtGui.QDialog())
-            self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1]))
+            self._line_pages.append(QtWidgets.QDialog())
+            self._line_forms.append(QtWidgets.QFormLayout(self._line_pages[-1]))
 
             label = self.top_block.gui_snk.line_label(n)
-            self._label_edit.append(QtGui.QLineEdit(self))
+            self._label_edit.append(QtWidgets.QLineEdit(self))
             self._label_edit[-1].setMinimumWidth(125)
             self._label_edit[-1].setMaximumWidth(125)
-            self._label_edit[-1].setText(QtCore.QString("%1").arg(label))
+            self._label_edit[-1].setText("{0}".format(label))
             self._line_forms[-1].addRow("Label:", self._label_edit[-1])
-            self.connect(self._label_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_label)
+            self._label_edit[-1].returnPressed.connect(self.update_line_label)
 
-            width_val = QtGui.QIntValidator(1, 20, self)
-            self._size_edit.append(QtGui.QLineEdit(self))
+            width_val = QtWidgets.QIntValidator(1, 20, self)
+            self._size_edit.append(QtWidgets.QLineEdit(self))
             self._size_edit[-1].setValidator(width_val)
             self._size_edit[-1].setMinimumWidth(100)
             self._size_edit[-1].setMaximumWidth(100)
-            self._size_edit[-1].setText(QtCore.QString("%1").arg(1))
+            self._size_edit[-1].setText("{0}".format(1))
             self._line_forms[-1].addRow("Width:", self._size_edit[-1])
-            self.connect(self._size_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_size)
+            self._size_edit[-1].returnPressed.connect(self.update_line_size)
 
             color = self.top_block.gui_snk.line_color(n)
-            self._color_edit.append(QtGui.QLineEdit(self))
+            self._color_edit.append(QtWidgets.QLineEdit(self))
             self._color_edit[-1].setMinimumWidth(100)
             self._color_edit[-1].setMaximumWidth(100)
-            self._color_edit[-1].setText(QtCore.QString("%1").arg(color))
+            self._color_edit[-1].setText("{0}".format(color))
             self._line_forms[-1].addRow("Color:", self._color_edit[-1])
-            self.connect(self._color_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_color)
-
-            self._qtstyles = {"None": QtCore.Qt.NoPen,
-                              "Solid": QtCore.Qt.SolidLine,
-                              "Dash": QtCore.Qt.DashLine,
-                              "Dot": QtCore.Qt.DotLine,
-                              "DashDot": QtCore.Qt.DashDotLine,
-                              "DashDotDot": QtCore.Qt.DashDotDotLine}
-            self._style_edit.append(QtGui.QComboBox(self))
+            self._color_edit[-1].returnPressed.connect(self.update_line_color)
+
+            self._qtstyles = {"None": Qt.Qt.NoPen,
+                              "Solid": Qt.Qt.SolidLine,
+                              "Dash": Qt.Qt.DashLine,
+                              "Dot": Qt.Qt.DotLine,
+                              "DashDot": Qt.Qt.DashDotLine,
+                              "DashDotDot": Qt.Qt.DashDotDotLine}
+            self._style_edit.append(QtWidgets.QComboBox(self))
             self._style_edit[-1].addItems(["None", "Solid", "Dash",
                                           "Dot", "DashDot", "DashDotDot"])
             self._style_edit[-1].setCurrentIndex(1)
             self._line_forms[-1].addRow("Style:", self._style_edit[-1])
-            self.connect(self._style_edit[-1],
-                         QtCore.SIGNAL("currentIndexChanged(int)"),
-                         self.update_line_style)
+            self._style_edit[-1].currentIndexChanged.connect(self.update_line_style)
 
             # A bit dangerous, this. If QWT ever changes the lineup,
             # we will have to adjust this, too. But we also can't
@@ -236,28 +221,25 @@ class plot_form(QtGui.QWidget):
                                 "Star 1": 12,
                                 "Star 2": 13,
                                 "Hexagon": 14}
-            self._marker_edit.append(QtGui.QComboBox(self))
+            self._marker_edit.append(QtWidgets.QComboBox(self))
             self._marker_edit[-1].addItems(["None", "Circle", "Rectangle", "Diamond",
                                             "Triangle", "Down Triangle", "Left Triangle",
                                             "Right Triangle", "Cross", "X-Cross",
                                             "Horiz. Line", "Vert. Line", "Star 1",
                                             "Star 2", "Hexagon"])
             self._line_forms[-1].addRow("Marker:", self._marker_edit[-1])
-            self.connect(self._marker_edit[-1],
-                         QtCore.SIGNAL("currentIndexChanged(int)"),
-                         self.update_line_marker)
+            self._marker_edit[-1].currentIndexChanged.connect(self.update_line_marker)
 
-            alpha_val = QtGui.QDoubleValidator(0, 1.0, 2, self)
+            alpha_val = QtWidgets.QDoubleValidator(0, 1.0, 2, self)
             alpha_val.setTop(1.0)
             alpha = self.top_block.gui_snk.line_alpha(n)
-            self._alpha_edit.append(QtGui.QLineEdit(self))
+            self._alpha_edit.append(QtWidgets.QLineEdit(self))
             self._alpha_edit[-1].setMinimumWidth(50)
             self._alpha_edit[-1].setMaximumWidth(100)
-            self._alpha_edit[-1].setText(QtCore.QString("%1").arg(alpha))
+            self._alpha_edit[-1].setText("{0]".format(alpha))
             self._alpha_edit[-1].setValidator(alpha_val)
             self._line_forms[-1].addRow("Alpha:", self._alpha_edit[-1])
-            self.connect(self._alpha_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_alpha)
+            self._alpha_edit[-1].returnPressed.connect(self.update_line_alpha)
 
             self._line_tabs.addTab(self._line_pages[-1], "{0}".format(label))
 
@@ -303,10 +285,10 @@ class plot_form(QtGui.QWidget):
         newend = self.end_edit.text().toUInt()[0]
         if(newstart != self._start or newend != self._end):
             if(newend < newstart):
-                QtGui.QMessageBox.information(
+                QtWidgets.QMessageBox.information(
                     self, "Warning",
                     "End sample is less than start sample.",
-                    QtGui.QMessageBox.Ok);
+                    QtWidgets.QMessageBox.Ok);
             else:
                 newnsamps = newend - newstart
                 self.top_block.reset(newstart, newnsamps)
@@ -377,13 +359,13 @@ class plot_form(QtGui.QWidget):
             self.top_block.gui_snk.enable_grid(False)
 
     def save_figure(self):
-        qpix = QtGui.QPixmap.grabWidget(self.top_block.pyWin)
+        qpix = QtWidgets.QPixmap.grabWidget(self.top_block.pyWin)
         types = "JPEG file (*.jpg);;" + \
             "Portable Network Graphics file (*.png);;" + \
             "Bitmap file (*.bmp);;" + \
             "TIFF file (*.tiff)"
-        filebox = QtGui.QFileDialog(self, "Save Image", "./", types)
-        filebox.setViewMode(QtGui.QFileDialog.Detail)
+        filebox = QtWidgets.QFileDialog(self, "Save Image", "./", types)
+        filebox.setViewMode(QtWidgets.QFileDialog.Detail)
         if(filebox.exec_()):
             filename = filebox.selectedFiles()[0]
             filetype = filebox.selectedNameFilter()
diff --git a/gr-qtgui/apps/plot_psd_base.py b/gr-qtgui/apps/plot_psd_base.py
index 46f903e1b5..bf070f2c1c 100644
--- a/gr-qtgui/apps/plot_psd_base.py
+++ b/gr-qtgui/apps/plot_psd_base.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -27,16 +27,16 @@ import os, 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    sys.stderr.write("Error: Scipy required (www.scipy.org).\n")
     sys.exit(1)
 
 try:
@@ -69,7 +69,7 @@ class plot_base(gr.top_block):
 
         self._is_setup = False
 
-        self.qapp = QtGui.QApplication(sys.argv)
+        self.qapp = QtWidgets.QApplication(sys.argv)
 
     def setup(self):
         self.skip = blocks.skiphead(self.dsize, self._start)
@@ -104,7 +104,7 @@ class plot_base(gr.top_block):
 
         # Get Python Qt references
         pyQt  = self.gui_snk.pyqwidget()
-        self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+        self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
 
         self._is_setup = True
 
diff --git a/gr-qtgui/apps/plot_psd_form.py b/gr-qtgui/apps/plot_psd_form.py
index 2d1fcd10bc..3109fb2b0c 100644
--- a/gr-qtgui/apps/plot_psd_form.py
+++ b/gr-qtgui/apps/plot_psd_form.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -24,10 +24,10 @@ import sys
 from gnuradio import filter
 
 try:
-    from PyQt4 import QtGui, QtCore
+    from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
@@ -39,39 +39,35 @@ class plot_psd_form(plot_form):
     def __init__(self, top_block, title=''):
         plot_form.__init__(self, top_block, title)
 
-        self.right_col_layout = QtGui.QVBoxLayout()
-        self.right_col_form = QtGui.QFormLayout()
+        self.right_col_layout = QtWidgets.QVBoxLayout()
+        self.right_col_form = QtWidgets.QFormLayout()
         self.right_col_layout.addLayout(self.right_col_form)
         self.layout.addLayout(self.right_col_layout, 1,4,1,1)
 
-        self.psd_size_val = QtGui.QIntValidator(0, 2**18, self)
-        self.psd_size_edit = QtGui.QLineEdit(self)
+        self.psd_size_val = QtWidgets.QIntValidator(0, 2**18, self)
+        self.psd_size_edit = QtWidgets.QLineEdit(self)
         self.psd_size_edit.setMinimumWidth(50)
         self.psd_size_edit.setMaximumWidth(100)
-        self.psd_size_edit.setText(QtCore.QString("%1").arg(top_block._psd_size))
+        self.psd_size_edit.setText("{0}".format(top_block._psd_size))
         self.psd_size_edit.setValidator(self.psd_size_val)
         self.right_col_form.addRow("FFT:", self.psd_size_edit)
-        self.connect(self.psd_size_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_psd_size)
+        self.psd_size_edit.returnPressed.connect(self.update_psd_size)
 
-        self.psd_win_combo = QtGui.QComboBox(self)
+        self.psd_win_combo = QtWidgets.QComboBox(self)
         self.psd_win_combo.addItems(["None", "Hamming", "Hann", "Blackman",
                                      "Rectangular", "Kaiser", "Blackman-harris"])
         self.psd_win_combo.setCurrentIndex(self.top_block.gui_snk.fft_window()+1)
         self.right_col_form.addRow("Window:", self.psd_win_combo)
-        self.connect(self.psd_win_combo,
-                     QtCore.SIGNAL("currentIndexChanged(int)"),
-                     self.update_psd_win)
+        self.psd_win_combo.currentIndexChanged.connect(self.update_psd_win)
 
-        self.psd_avg_val = QtGui.QDoubleValidator(0, 1.0, 4, self)
-        self.psd_avg_edit = QtGui.QLineEdit(self)
+        self.psd_avg_val = QtWidgets.QDoubleValidator(0, 1.0, 4, self)
+        self.psd_avg_edit = QtWidgets.QLineEdit(self)
         self.psd_avg_edit.setMinimumWidth(50)
         self.psd_avg_edit.setMaximumWidth(100)
-        self.psd_avg_edit.setText(QtCore.QString("%1").arg(top_block._avg))
+        self.psd_avg_edit.setText("{0}".format(top_block._avg))
         self.psd_avg_edit.setValidator(self.psd_avg_val)
         self.right_col_form.addRow("Average:", self.psd_avg_edit)
-        self.connect(self.psd_avg_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_psd_avg)
+        self.psd_avg_edit.returnPressed.connect(self.update_psd_avg)
 
         self.add_line_control(self.right_col_layout)
 
diff --git a/gr-qtgui/apps/plot_spectrogram_base.py b/gr-qtgui/apps/plot_spectrogram_base.py
index b252bb8863..295ef4a753 100644
--- a/gr-qtgui/apps/plot_spectrogram_base.py
+++ b/gr-qtgui/apps/plot_spectrogram_base.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -27,16 +27,16 @@ import os, 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    sys.stderr.write("Error: Scipy required (www.scipy.org).\n")
     sys.exit(1)
 
 try:
@@ -69,7 +69,7 @@ class plot_base(gr.top_block):
 
         self._is_setup = False
 
-        self.qapp = QtGui.QApplication(sys.argv)
+        self.qapp = QtWidgets.QApplication(sys.argv)
 
     def setup(self):
         self.skip = blocks.skiphead(self.dsize, self._start)
@@ -106,7 +106,7 @@ class plot_base(gr.top_block):
 
         # Get Python Qt references
         pyQt = self.gui_snk.pyqwidget()
-        self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+        self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
 
         self._is_setup = True
 
diff --git a/gr-qtgui/apps/plot_spectrogram_form.py b/gr-qtgui/apps/plot_spectrogram_form.py
index 17cb0335bd..ab4685106d 100644
--- a/gr-qtgui/apps/plot_spectrogram_form.py
+++ b/gr-qtgui/apps/plot_spectrogram_form.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -24,10 +24,10 @@ import sys
 from gnuradio import filter
 
 try:
-    from PyQt4 import QtGui, QtCore
+    from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    sys.stderr.write("Error: Program requires PyQt5.\n")
     sys.exit(1)
 
 try:
@@ -39,45 +39,40 @@ class plot_spectrogram_form(plot_form):
     def __init__(self, top_block, title=''):
         plot_form.__init__(self, top_block, title)
 
-        self.right_col_layout = QtGui.QVBoxLayout()
-        self.right_col_form = QtGui.QFormLayout()
+        self.right_col_layout = QtWidgets.QVBoxLayout()
+        self.right_col_form = QtWidgets.QFormLayout()
         self.right_col_layout.addLayout(self.right_col_form)
         self.layout.addLayout(self.right_col_layout, 1,4,1,1)
 
-        self.psd_size_val = QtGui.QIntValidator(0, 2**18, self)
-        self.psd_size_edit = QtGui.QLineEdit(self)
+        self.psd_size_val = QtWidgets.QIntValidator(0, 2**18, self)
+        self.psd_size_edit = QtWidgets.QLineEdit(self)
         self.psd_size_edit.setMinimumWidth(50)
         self.psd_size_edit.setMaximumWidth(100)
-        self.psd_size_edit.setText(QtCore.QString("%1").arg(top_block._psd_size))
+        self.psd_size_edit.setText("{0}".format(top_block._psd_size))
         self.psd_size_edit.setValidator(self.psd_size_val)
         self.right_col_form.addRow("FFT Size:", self.psd_size_edit)
-        self.connect(self.psd_size_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_psd_size)
+        self.psd_size_edit.returnPressed.connect(self.update_psd_size)
 
-        self.psd_win_combo = QtGui.QComboBox(self)
+        self.psd_win_combo = QtWidgets.QComboBox(self)
         self.psd_win_combo.addItems(["None", "Hamming", "Hann", "Blackman",
                                      "Rectangular", "Kaiser", "Blackman-harris"])
         self.psd_win_combo.setCurrentIndex(self.top_block.gui_snk.fft_window()+1)
         self.right_col_form.addRow("Window:", self.psd_win_combo)
-        self.connect(self.psd_win_combo,
-                     QtCore.SIGNAL("currentIndexChanged(int)"),
-                     self.update_psd_win)
+        self.psd_win_combo.currentIndexChanged.connect(self.update_psd_win)
 
-        self.psd_avg_val = QtGui.QDoubleValidator(0, 1.0, 4, self)
-        self.psd_avg_edit = QtGui.QLineEdit(self)
+        self.psd_avg_val = QtWidgets.QDoubleValidator(0, 1.0, 4, self)
+        self.psd_avg_edit = QtWidgets.QLineEdit(self)
         self.psd_avg_edit.setMinimumWidth(50)
         self.psd_avg_edit.setMaximumWidth(100)
-        self.psd_avg_edit.setText(QtCore.QString("%1").arg(top_block._avg))
+        self.psd_avg_edit.setText("{0}".format(top_block._avg))
         self.psd_avg_edit.setValidator(self.psd_avg_val)
         self.right_col_form.addRow("Average:", self.psd_avg_edit)
-        self.connect(self.psd_avg_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.update_psd_avg)
+        self.psd_avg_edit.returnPressed.connect(self.update_psd_avg)
 
-        self.autoscale_button = QtGui.QPushButton("Auto Scale", self)
+        self.autoscale_button = QtWidgets.QPushButton("Auto Scale", self)
         self.autoscale_button.setMaximumWidth(100)
         self.right_col_layout.addWidget(self.autoscale_button)
-        self.connect(self.autoscale_button, QtCore.SIGNAL("clicked()"),
-                     self.spectrogram_auto_scale)
+        self.autoscale_button.clicked.connect(self.spectrogram_auto_scale)
 
         self.add_spectrogram_control(self.right_col_layout)
 
@@ -103,7 +98,7 @@ class plot_spectrogram_form(plot_form):
                                  self.top_block._nsamps)
 
     def add_spectrogram_control(self, layout):
-        self._line_tabs = QtGui.QTabWidget()
+        self._line_tabs = QtWidgets.QTabWidget()
 
         self._line_pages = []
         self._line_forms = []
@@ -114,38 +109,34 @@ class plot_spectrogram_form(plot_form):
         self._marker_edit = []
         self._alpha_edit = []
         for n in xrange(self.top_block._nsigs):
-            self._line_pages.append(QtGui.QDialog())
-            self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1]))
+            self._line_pages.append(QtWidgets.QDialog())
+            self._line_forms.append(QtWidgets.QFormLayout(self._line_pages[-1]))
 
             label = self.top_block.gui_snk.line_label(n)
-            self._label_edit.append(QtGui.QLineEdit(self))
+            self._label_edit.append(QtWidgets.QLineEdit(self))
             self._label_edit[-1].setMinimumWidth(125)
             self._label_edit[-1].setMaximumWidth(125)
-            self._label_edit[-1].setText(QtCore.QString("%1").arg(label))
+            self._label_edit[-1].setText("{0}".format(label))
             self._line_forms[-1].addRow("Label:", self._label_edit[-1])
-            self.connect(self._label_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_label)
+            self._label_edit[-1].returnPressed.connect(self.update_line_label)
 
             self._qtcolormaps = ["Multi Color", "White Hot",
                                  "Black Hot", "Incandescent"]
-            self._color_edit.append(QtGui.QComboBox(self))
+            self._color_edit.append(QtWidgets.QComboBox(self))
             self._color_edit[-1].addItems(self._qtcolormaps)
             self._line_forms[-1].addRow("Color Map:", self._color_edit[-1])
-            self.connect(self._color_edit[-1],
-                         QtCore.SIGNAL("currentIndexChanged(int)"),
-                         self.update_color_map)
+            self._color_edit[-1].currentIndexChanged.connect(self.update_color_map)
 
-            alpha_val = QtGui.QDoubleValidator(0, 1.0, 2, self)
+            alpha_val = QtWidgets.QDoubleValidator(0, 1.0, 2, self)
             alpha_val.setTop(1.0)
             alpha = self.top_block.gui_snk.line_alpha(n)
-            self._alpha_edit.append(QtGui.QLineEdit(self))
+            self._alpha_edit.append(QtWidgets.QLineEdit(self))
             self._alpha_edit[-1].setMinimumWidth(50)
             self._alpha_edit[-1].setMaximumWidth(100)
-            self._alpha_edit[-1].setText(QtCore.QString("%1").arg(alpha))
+            self._alpha_edit[-1].setText("{0}".format(alpha))
             self._alpha_edit[-1].setValidator(alpha_val)
             self._line_forms[-1].addRow("Alpha:", self._alpha_edit[-1])
-            self.connect(self._alpha_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_alpha)
+            self._alpha_edit[-1].returnPressed.connect(self.update_line_alpha)
 
             self._line_tabs.addTab(self._line_pages[-1], "{0}".format(label))
 
diff --git a/gr-qtgui/apps/plot_time_base.py b/gr-qtgui/apps/plot_time_base.py
index 007c94d044..82e7d75cae 100644
--- a/gr-qtgui/apps/plot_time_base.py
+++ b/gr-qtgui/apps/plot_time_base.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -27,16 +27,16 @@ import os, 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    sys.stderr.write("Error: Scipy required (www.scipy.org).\n")
     sys.exit(1)
 
 try:
@@ -68,7 +68,7 @@ class plot_base(gr.top_block):
         self._y_value = 1
         self.gui_y_axis = None
 
-        self.qapp = QtGui.QApplication(sys.argv)
+        self.qapp = QtWidgets.QApplication(sys.argv)
 
     def setup(self):
         self.skip = blocks.skiphead(self.dsize, self._start)
@@ -108,7 +108,7 @@ class plot_base(gr.top_block):
 
         # Get Python Qt references
         pyQt  = self.gui_snk.pyqwidget()
-        self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+        self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
 
         self._is_setup = True
 
diff --git a/gr-qtgui/apps/plot_time_form.py b/gr-qtgui/apps/plot_time_form.py
index 0ab94e6cfe..0e650813ff 100644
--- a/gr-qtgui/apps/plot_time_form.py
+++ b/gr-qtgui/apps/plot_time_form.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -24,10 +24,10 @@ import sys
 from gnuradio import filter
 
 try:
-    from PyQt4 import QtGui, QtCore
+    from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    sys.stderr.write("Error: Program requires PyQt5.\n")
     sys.exit(1)
 
 try:
@@ -39,21 +39,19 @@ class plot_time_form(plot_form):
     def __init__(self, top_block, title='', scale=1):
         plot_form.__init__(self, top_block, title, scale)
 
-        self.right_col_layout = QtGui.QVBoxLayout()
-        self.right_col_form = QtGui.QFormLayout()
+        self.right_col_layout = QtWidgets.QVBoxLayout()
+        self.right_col_form = QtWidgets.QFormLayout()
         self.right_col_layout.addLayout(self.right_col_form)
         self.layout.addLayout(self.right_col_layout, 1,4,1,1)
 
-        self.auto_scale = QtGui.QCheckBox("Auto Scale", self)
+        self.auto_scale = QtWidgets.QCheckBox("Auto Scale", self)
         if(self.top_block._auto_scale):
             self.auto_scale.setChecked(self.top_block._auto_scale)
-        self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"),
-                     self.set_auto_scale)
+        self.auto_scale.stateChanged.connect(self.set_auto_scale)
         self.right_col_layout.addWidget(self.auto_scale)
 
-        self.stem = QtGui.QCheckBox("Stem", self)
-        self.connect(self.stem, QtCore.SIGNAL("stateChanged(int)"),
-                     self.enable_stem)
+        self.stem = QtWidgets.QCheckBox("Stem", self)
+        self.stem.stateChanged.connect(self.enable_stem)
         self.right_col_layout.addWidget(self.stem)
 
         self.add_line_control(self.right_col_layout)
@@ -76,4 +74,3 @@ class plot_time_form(plot_form):
     def update_samp_rate(self):
         sr = self.samp_rate_edit.text().toDouble()[0]
         self.top_block.gui_snk.set_samp_rate(sr)
-
diff --git a/gr-qtgui/apps/plot_time_raster_base.py b/gr-qtgui/apps/plot_time_raster_base.py
index 856c8c8945..f1d4db8523 100644
--- a/gr-qtgui/apps/plot_time_raster_base.py
+++ b/gr-qtgui/apps/plot_time_raster_base.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -27,16 +27,18 @@ import os, 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."
+    import sys
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Scipy required (www.scipy.org)."
+    import sys
+    sys.stderr.write("Error: Scipy required (www.scipy.org).\n")
     sys.exit(1)
 
 try:
@@ -68,7 +70,7 @@ class plot_base(gr.top_block):
         self._y_value = 1
         self.gui_y_axis = None
 
-        self.qapp = QtGui.QApplication(sys.argv)
+        self.qapp = QtWidgets.QApplication(sys.argv)
 
     def setup(self):
         self.skip = blocks.skiphead(self.dsize, self._start)
@@ -103,7 +105,7 @@ class plot_base(gr.top_block):
 
         # Get Python Qt references
         pyQt  = self.gui_snk.pyqwidget()
-        self.pyWin = sip.wrapinstance(pyQt, QtGui.QWidget)
+        self.pyWin = sip.wrapinstance(pyQt, QtWidgets.QWidget)
 
         self._is_setup = True
 
diff --git a/gr-qtgui/apps/plot_time_raster_form.py b/gr-qtgui/apps/plot_time_raster_form.py
index 32fbba0765..ffd2975042 100644
--- a/gr-qtgui/apps/plot_time_raster_form.py
+++ b/gr-qtgui/apps/plot_time_raster_form.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2013 Free Software Foundation, Inc.
+# Copyright 2013,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -24,10 +24,10 @@ import sys, math
 from gnuradio import filter
 
 try:
-    from PyQt4 import QtGui, QtCore
+    from PyQt5 import QtWidgets, Qt
     import sip
 except ImportError:
-    print "Error: Program requires PyQt4."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
@@ -39,39 +39,35 @@ class plot_time_raster_form(plot_form):
     def __init__(self, top_block, title='', scale=1):
         plot_form.__init__(self, top_block, title, scale)
 
-        self.right_col_layout = QtGui.QVBoxLayout()
-        self.right_col_form = QtGui.QFormLayout()
+        self.right_col_layout = QtWidgets.QVBoxLayout()
+        self.right_col_form = QtWidgets.QFormLayout()
         self.right_col_layout.addLayout(self.right_col_form)
         self.layout.addLayout(self.right_col_layout, 1,4,1,1)
 
-        self.auto_scale = QtGui.QCheckBox("Auto Scale", self)
+        self.auto_scale = QtWidgets.QCheckBox("Auto Scale", self)
         if(self.top_block._auto_scale):
             self.auto_scale.setChecked(self.top_block._auto_scale)
-        self.connect(self.auto_scale, QtCore.SIGNAL("stateChanged(int)"),
-                     self.set_auto_scale)
+        self.auto_scale.stateChanged.connect(self.set_auto_scale)
         self.right_col_layout.addWidget(self.auto_scale)
 
-        self.ncols_edit = QtGui.QLineEdit(self)
+        self.ncols_edit = QtWidgets.QLineEdit(self)
         self.ncols_edit.setMinimumWidth(100)
         self.ncols_edit.setMaximumWidth(100)
-        self.ncols_edit.setText(QtCore.QString("%1").arg(top_block._ncols))
+        self.ncols_edit.setText("{0}".format(top_block._ncols))
         self.right_col_form.addRow("Num. Cols.", self.ncols_edit)
-        self.connect(self.ncols_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.ncols_update)
+        self.ncols_edit.returnPressed.connect(self.ncols_update)
 
-        self.nrows_edit = QtGui.QLineEdit(self)
+        self.nrows_edit = QtWidgets.QLineEdit(self)
         self.nrows_edit.setMinimumWidth(100)
         self.nrows_edit.setMaximumWidth(100)
-        self.nrows_edit.setText(QtCore.QString("%1").arg(top_block._nrows))
+        self.nrows_edit.setText("{0}".format(top_block._nrows))
         self.right_col_form.addRow("Num. Rows.", self.nrows_edit)
-        self.connect(self.nrows_edit, QtCore.SIGNAL("returnPressed()"),
-                     self.nrows_update)
-
+        self.nrows_edit.returnPressed.connect(self.nrows_update)
 
         self.add_raster_control(self.right_col_layout)
 
     def add_raster_control(self, layout):
-        self._line_tabs = QtGui.QTabWidget()
+        self._line_tabs = QtWidgets.QTabWidget()
 
         self._line_pages = []
         self._line_forms = []
@@ -82,39 +78,35 @@ class plot_time_raster_form(plot_form):
         self._marker_edit = []
         self._alpha_edit = []
         for n in xrange(self.top_block._nsigs):
-            self._line_pages.append(QtGui.QDialog())
-            self._line_forms.append(QtGui.QFormLayout(self._line_pages[-1]))
+            self._line_pages.append(QtWidgets.QDialog())
+            self._line_forms.append(QtWidgets.QFormLayout(self._line_pages[-1]))
 
             label = self.top_block.gui_snk.line_label(n)
-            self._label_edit.append(QtGui.QLineEdit(self))
+            self._label_edit.append(QtWidgets.QLineEdit(self))
             self._label_edit[-1].setMinimumWidth(125)
             self._label_edit[-1].setMaximumWidth(125)
-            self._label_edit[-1].setText(QtCore.QString("%1").arg(label))
+            self._label_edit[-1].setText("{0}".format(label))
             self._line_forms[-1].addRow("Label:", self._label_edit[-1])
-            self.connect(self._label_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_label)
+            self._label_edit[-1].returnPressed.connect(self.update_line_label)
 
             self._qtcolormaps = ["Multi Color", "White Hot",
                                  "Black Hot", "Incandescent"]
-            self._color_edit.append(QtGui.QComboBox(self))
+            self._color_edit.append(QtWidgets.QComboBox(self))
             self._color_edit[-1].addItems(self._qtcolormaps)
             self._color_edit[-1].setCurrentIndex(1)
             self._line_forms[-1].addRow("Color Map:", self._color_edit[-1])
-            self.connect(self._color_edit[-1],
-                         QtCore.SIGNAL("currentIndexChanged(int)"),
-                         self.update_color_map)
+            self._color_edit[-1].currentIndexChanged.connect(self.update_color_map)
 
-            alpha_val = QtGui.QDoubleValidator(0, 1.0, 2, self)
+            alpha_val = QtWidgets.QDoubleValidator(0, 1.0, 2, self)
             alpha_val.setTop(1.0)
             alpha = self.top_block.gui_snk.line_alpha(n)
-            self._alpha_edit.append(QtGui.QLineEdit(self))
+            self._alpha_edit.append(QtWidgets.QLineEdit(self))
             self._alpha_edit[-1].setMinimumWidth(50)
             self._alpha_edit[-1].setMaximumWidth(100)
-            self._alpha_edit[-1].setText(QtCore.QString("%1").arg(alpha))
+            self._alpha_edit[-1].setText("{0}".format(alpha))
             self._alpha_edit[-1].setValidator(alpha_val)
             self._line_forms[-1].addRow("Alpha:", self._alpha_edit[-1])
-            self.connect(self._alpha_edit[-1], QtCore.SIGNAL("returnPressed()"),
-                         self.update_line_alpha)
+            self._alpha_edit[-1].returnPressed.connect(self.update_line_alpha)
 
             self._line_tabs.addTab(self._line_pages[-1], "{0}".format(label))
 
@@ -153,5 +145,3 @@ class plot_time_raster_form(plot_form):
 
         nsamps = int(math.ceil(self.top_block._ncols*(n+1)))
         self.top_block.reset(self._start, nsamps)
-
-
diff --git a/gr-qtgui/apps/qt_digital.py b/gr-qtgui/apps/qt_digital.py
index fef4f448b4..fbaeacd462 100755
--- a/gr-qtgui/apps/qt_digital.py
+++ b/gr-qtgui/apps/qt_digital.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2011 Free Software Foundation, Inc.
+# Copyright 2011,2018 Free Software Foundation, Inc.
 # 
 # This file is part of GNU Radio
 # 
@@ -29,28 +29,28 @@ 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
     import scipy
 except ImportError:
-    print "Error: Program requires scipy (see: www.scipy.org)."
+    sys.stderr.write("Error: Program requires scipy (see: www.scipy.org).\n")
     sys.exit(1)
 
 try:
     from qt_digital_window import Ui_DigitalWindow
 except ImportError:
-    print "Error: could not find qt_digital_window.py:"
-    print "\t\"Please run: pyuic4 qt_digital_window.ui -o qt_digital_window.py\""
+    sys.stderr.write("Error: could not find qt_digital_window.py:\n")
+    sys.stderr.write("\t\"Please run: pyuic5 qt_digital_window.ui -o qt_digital_window.py\"\n")
     sys.exit(1)
 
-class dialog_box(QtGui.QMainWindow):
+class dialog_box(QtWidgets.QMainWindow):
     def __init__(self, snkTx, snkRx, fg, parent=None):
-        QtGui.QWidget.__init__(self, parent)
+        QtWidgets.QWidget.__init__(self, parent)
         self.gui = Ui_DigitalWindow()
         self.gui.setupUi(self)
 
@@ -71,23 +71,13 @@ class dialog_box(QtGui.QMainWindow):
 
 
         # Connect up some signals
-        self.connect(self.gui.pauseButton, QtCore.SIGNAL("clicked()"),
-                     self.pauseFg)
-
-        self.connect(self.gui.sampleRateEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.sampleRateEditText)
-
-        self.connect(self.gui.snrEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.snrEditText)
-        self.connect(self.gui.freqEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.freqEditText)
-        self.connect(self.gui.timeEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.timeEditText)
-
-        self.connect(self.gui.gainMuEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.gainMuEditText)
-        self.connect(self.gui.alphaEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.alphaEditText)
+        self.gui.pauseButton.clicked.connect(self.pauseFg)
+        self.gui.sampleRateEdit.editingFinished.connect(self.sampleRateEditText)
+        self.gui.snrEdit.editingFinished.connect(self.snrEditText)
+        self.gui.freqEdit.editingFinished.connect(self.freqEditText)
+        self.gui.timeEdit.editingFinished.connect(self.timeEditText)
+        self.gui.gainMuEdit.editingFinished.connect(self.gainMuEditText)
+        self.gui.alphaEdit.editingFinished.connect(self.alphaEditText)
 
 
     def pauseFg(self):
@@ -102,7 +92,7 @@ class dialog_box(QtGui.QMainWindow):
     # Accessor functions for Gui to manipulate system parameters
     def set_sample_rate(self, sr):
         ssr = eng_notation.num_to_str(sr)
-        self.gui.sampleRateEdit.setText(QtCore.QString("%1").arg(ssr))
+        self.gui.sampleRateEdit.setText("{0}".format(ssr))
 
     def sampleRateEditText(self):
         try:
@@ -115,13 +105,13 @@ class dialog_box(QtGui.QMainWindow):
 
     # Accessor functions for Gui to manipulate channel model
     def set_snr(self, snr):
-        self.gui.snrEdit.setText(QtCore.QString("%1").arg(snr))
+        self.gui.snrEdit.setText("{0}".format(snr))
 
     def set_frequency(self, fo):
-        self.gui.freqEdit.setText(QtCore.QString("%1").arg(fo))
+        self.gui.freqEdit.setText("{0}".format(fo))
 
     def set_time_offset(self, to):
-        self.gui.timeEdit.setText(QtCore.QString("%1").arg(to))
+        self.gui.timeEdit.setText("{0}".format(to))
 
     def snrEditText(self):
         try:
@@ -147,10 +137,10 @@ class dialog_box(QtGui.QMainWindow):
 
     # Accessor functions for Gui to manipulate receiver parameters
     def set_gain_mu(self, gain):
-        self.gui.gainMuEdit.setText(QtCore.QString("%1").arg(gain))
+        self.gui.gainMuEdit.setText("{0}".format(gain))
 
     def set_loop_bw(self, bw):
-        self.gui.alphaEdit.setText(QtCore.QString("%1").arg(bw))
+        self.gui.alphaEdit.setText("{0}".format(bw))
 
     def alphaEditText(self):
         try:
@@ -171,7 +161,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)
 
         self._sample_rate = 2000e3
 
@@ -231,10 +221,10 @@ class my_top_block(gr.top_block):
         self.connect(self.channel, self.rx_rrc, self.receiver, self.snk_rx)
         
         pyTxQt  = self.snk_tx.pyqwidget()
-        pyTx = sip.wrapinstance(pyTxQt, QtGui.QWidget)
+        pyTx = sip.wrapinstance(pyTxQt, QtWidgets.QWidget)
 
         pyRxQt  = self.snk_rx.pyqwidget()
-        pyRx = sip.wrapinstance(pyRxQt, QtGui.QWidget)
+        pyRx = sip.wrapinstance(pyRxQt, QtWidgets.QWidget)
 
         self.main_box = dialog_box(pyTx, pyRx, self);
         self.main_box.show()
diff --git a/gr-qtgui/apps/qt_digital_window.py b/gr-qtgui/apps/qt_digital_window.py
index 50dd53a923..90c0f29e09 100644
--- a/gr-qtgui/apps/qt_digital_window.py
+++ b/gr-qtgui/apps/qt_digital_window.py
@@ -3,159 +3,159 @@
 # Form implementation generated from reading ui file 'qt_digital_window.ui'
 #
 # Created: Sat May  1 20:14:02 2010
-#      by: PyQt4 UI code generator 4.6.1
+#      by: PyQt5 UI code generator 4.6.1
 #
 # WARNING! All changes made in this file will be lost!
 
-from PyQt4 import QtCore, QtGui
+from PyQt5 import QtWidgets, Qt
 
 class Ui_DigitalWindow(object):
     def setupUi(self, DigitalWindow):
         DigitalWindow.setObjectName("DigitalWindow")
         DigitalWindow.resize(1236, 741)
-        self.centralwidget = QtGui.QWidget(DigitalWindow)
+        self.centralwidget = QtWidgets.QWidget(DigitalWindow)
         self.centralwidget.setObjectName("centralwidget")
-        self.verticalLayout = QtGui.QVBoxLayout(self.centralwidget)
+        self.verticalLayout = QtWidgets.QVBoxLayout(self.centralwidget)
         self.verticalLayout.setObjectName("verticalLayout")
-        self.sinkFrame = QtGui.QFrame(self.centralwidget)
-        self.sinkFrame.setMinimumSize(QtCore.QSize(0, 550))
-        self.sinkFrame.setFrameShape(QtGui.QFrame.StyledPanel)
-        self.sinkFrame.setFrameShadow(QtGui.QFrame.Raised)
+        self.sinkFrame = QtWidgets.QFrame(self.centralwidget)
+        self.sinkFrame.setMinimumSize(Qt.QSize(0, 550))
+        self.sinkFrame.setFrameShape(QtWidgets.QFrame.StyledPanel)
+        self.sinkFrame.setFrameShadow(QtWidgets.QFrame.Raised)
         self.sinkFrame.setObjectName("sinkFrame")
-        self.horizontalLayout_2 = QtGui.QHBoxLayout(self.sinkFrame)
+        self.horizontalLayout_2 = QtWidgets.QHBoxLayout(self.sinkFrame)
         self.horizontalLayout_2.setObjectName("horizontalLayout_2")
-        self.sinkLayout = QtGui.QHBoxLayout()
+        self.sinkLayout = QtWidgets.QHBoxLayout()
         self.sinkLayout.setObjectName("sinkLayout")
         self.horizontalLayout_2.addLayout(self.sinkLayout)
         self.verticalLayout.addWidget(self.sinkFrame)
-        self.horizontalLayout = QtGui.QHBoxLayout()
+        self.horizontalLayout = QtWidgets.QHBoxLayout()
         self.horizontalLayout.setObjectName("horizontalLayout")
-        self.sysBox = QtGui.QGroupBox(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Minimum)
+        self.sysBox = QtWidgets.QGroupBox(self.centralwidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Minimum)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.sysBox.sizePolicy().hasHeightForWidth())
         self.sysBox.setSizePolicy(sizePolicy)
-        self.sysBox.setMinimumSize(QtCore.QSize(0, 0))
-        self.sysBox.setMaximumSize(QtCore.QSize(16777215, 120))
-        self.sysBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+        self.sysBox.setMinimumSize(Qt.QSize(0, 0))
+        self.sysBox.setMaximumSize(Qt.QSize(16777215, 120))
+        self.sysBox.setAlignment(Qt.Qt.AlignLeading|Qt.Qt.AlignLeft|Qt.Qt.AlignTop)
         self.sysBox.setObjectName("sysBox")
-        self.gridLayout_2 = QtGui.QGridLayout(self.sysBox)
+        self.gridLayout_2 = QtWidgets.QGridLayout(self.sysBox)
         self.gridLayout_2.setObjectName("gridLayout_2")
-        self.sampleRateEdit = QtGui.QLineEdit(self.sysBox)
-        self.sampleRateEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.sampleRateEdit = QtWidgets.QLineEdit(self.sysBox)
+        self.sampleRateEdit.setMaximumSize(Qt.QSize(100, 16777215))
         self.sampleRateEdit.setObjectName("sampleRateEdit")
         self.gridLayout_2.addWidget(self.sampleRateEdit, 0, 3, 1, 1)
-        self.sampleRateLabel = QtGui.QLabel(self.sysBox)
+        self.sampleRateLabel = QtWidgets.QLabel(self.sysBox)
         self.sampleRateLabel.setObjectName("sampleRateLabel")
         self.gridLayout_2.addWidget(self.sampleRateLabel, 0, 2, 1, 1)
         self.horizontalLayout.addWidget(self.sysBox)
-        self.rxBox = QtGui.QGroupBox(self.centralwidget)
-        self.rxBox.setMaximumSize(QtCore.QSize(16777215, 120))
-        self.rxBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+        self.rxBox = QtWidgets.QGroupBox(self.centralwidget)
+        self.rxBox.setMaximumSize(Qt.QSize(16777215, 120))
+        self.rxBox.setAlignment(Qt.Qt.AlignLeading|Qt.Qt.AlignLeft|Qt.Qt.AlignTop)
         self.rxBox.setObjectName("rxBox")
-        self.gridLayout_3 = QtGui.QGridLayout(self.rxBox)
+        self.gridLayout_3 = QtWidgets.QGridLayout(self.rxBox)
         self.gridLayout_3.setObjectName("gridLayout_3")
-        self.alphaLabel = QtGui.QLabel(self.rxBox)
+        self.alphaLabel = QtWidgets.QLabel(self.rxBox)
         self.alphaLabel.setObjectName("alphaLabel")
         self.gridLayout_3.addWidget(self.alphaLabel, 1, 0, 1, 1)
-        self.alphaEdit = QtGui.QLineEdit(self.rxBox)
-        self.alphaEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.alphaEdit = QtWidgets.QLineEdit(self.rxBox)
+        self.alphaEdit.setMaximumSize(Qt.QSize(100, 16777215))
         self.alphaEdit.setObjectName("alphaEdit")
         self.gridLayout_3.addWidget(self.alphaEdit, 1, 1, 1, 1)
-        self.gainMuLabel = QtGui.QLabel(self.rxBox)
+        self.gainMuLabel = QtWidgets.QLabel(self.rxBox)
         self.gainMuLabel.setObjectName("gainMuLabel")
         self.gridLayout_3.addWidget(self.gainMuLabel, 0, 0, 1, 1)
-        self.gainMuEdit = QtGui.QLineEdit(self.rxBox)
-        self.gainMuEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.gainMuEdit = QtWidgets.QLineEdit(self.rxBox)
+        self.gainMuEdit.setMaximumSize(Qt.QSize(100, 16777215))
         self.gainMuEdit.setObjectName("gainMuEdit")
         self.gridLayout_3.addWidget(self.gainMuEdit, 0, 1, 1, 1)
         self.horizontalLayout.addWidget(self.rxBox)
-        self.channelModeBox = QtGui.QGroupBox(self.centralwidget)
-        self.channelModeBox.setMaximumSize(QtCore.QSize(16777215, 120))
-        self.channelModeBox.setAlignment(QtCore.Qt.AlignLeading|QtCore.Qt.AlignLeft|QtCore.Qt.AlignTop)
+        self.channelModeBox = QtWidgets.QGroupBox(self.centralwidget)
+        self.channelModeBox.setMaximumSize(Qt.QSize(16777215, 120))
+        self.channelModeBox.setAlignment(Qt.Qt.AlignLeading|Qt.Qt.AlignLeft|Qt.Qt.AlignTop)
         self.channelModeBox.setObjectName("channelModeBox")
-        self.gridLayout = QtGui.QGridLayout(self.channelModeBox)
-        self.gridLayout.setSizeConstraint(QtGui.QLayout.SetMinimumSize)
+        self.gridLayout = QtWidgets.QGridLayout(self.channelModeBox)
+        self.gridLayout.setSizeConstraint(QtWidgets.QLayout.SetMinimumSize)
         self.gridLayout.setObjectName("gridLayout")
-        self.snrLabel = QtGui.QLabel(self.channelModeBox)
+        self.snrLabel = QtWidgets.QLabel(self.channelModeBox)
         self.snrLabel.setObjectName("snrLabel")
         self.gridLayout.addWidget(self.snrLabel, 0, 1, 1, 1)
-        self.snrEdit = QtGui.QLineEdit(self.channelModeBox)
-        self.snrEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.snrEdit = QtWidgets.QLineEdit(self.channelModeBox)
+        self.snrEdit.setMaximumSize(Qt.QSize(100, 16777215))
         self.snrEdit.setObjectName("snrEdit")
         self.gridLayout.addWidget(self.snrEdit, 0, 2, 1, 1)
-        self.freqLabel = QtGui.QLabel(self.channelModeBox)
+        self.freqLabel = QtWidgets.QLabel(self.channelModeBox)
         self.freqLabel.setObjectName("freqLabel")
         self.gridLayout.addWidget(self.freqLabel, 1, 1, 1, 1)
-        self.freqEdit = QtGui.QLineEdit(self.channelModeBox)
-        self.freqEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.freqEdit = QtWidgets.QLineEdit(self.channelModeBox)
+        self.freqEdit.setMaximumSize(Qt.QSize(100, 16777215))
         self.freqEdit.setObjectName("freqEdit")
         self.gridLayout.addWidget(self.freqEdit, 1, 2, 1, 1)
-        self.timeLabel = QtGui.QLabel(self.channelModeBox)
+        self.timeLabel = QtWidgets.QLabel(self.channelModeBox)
         self.timeLabel.setObjectName("timeLabel")
         self.gridLayout.addWidget(self.timeLabel, 2, 1, 1, 1)
-        self.timeEdit = QtGui.QLineEdit(self.channelModeBox)
-        self.timeEdit.setMaximumSize(QtCore.QSize(100, 16777215))
+        self.timeEdit = QtWidgets.QLineEdit(self.channelModeBox)
+        self.timeEdit.setMaximumSize(Qt.QSize(100, 16777215))
         self.timeEdit.setObjectName("timeEdit")
         self.gridLayout.addWidget(self.timeEdit, 2, 2, 1, 1)
         self.horizontalLayout.addWidget(self.channelModeBox)
-        spacerItem = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        spacerItem = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
         self.horizontalLayout.addItem(spacerItem)
-        self.verticalLayout_2 = QtGui.QVBoxLayout()
+        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
         self.verticalLayout_2.setObjectName("verticalLayout_2")
-        spacerItem1 = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        spacerItem1 = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
         self.verticalLayout_2.addItem(spacerItem1)
-        self.pauseButton = QtGui.QPushButton(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+        self.pauseButton = QtWidgets.QPushButton(self.centralwidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth())
         self.pauseButton.setSizePolicy(sizePolicy)
-        self.pauseButton.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.pauseButton.setMaximumSize(Qt.QSize(80, 16777215))
         self.pauseButton.setObjectName("pauseButton")
         self.verticalLayout_2.addWidget(self.pauseButton)
-        self.closeButton = QtGui.QPushButton(self.centralwidget)
-        self.closeButton.setMaximumSize(QtCore.QSize(80, 16777215))
+        self.closeButton = QtWidgets.QPushButton(self.centralwidget)
+        self.closeButton.setMaximumSize(Qt.QSize(80, 16777215))
         self.closeButton.setObjectName("closeButton")
         self.verticalLayout_2.addWidget(self.closeButton)
         self.horizontalLayout.addLayout(self.verticalLayout_2)
         self.verticalLayout.addLayout(self.horizontalLayout)
         DigitalWindow.setCentralWidget(self.centralwidget)
-        self.menubar = QtGui.QMenuBar(DigitalWindow)
-        self.menubar.setGeometry(QtCore.QRect(0, 0, 1236, 23))
+        self.menubar = QtWidgets.QMenuBar(DigitalWindow)
+        self.menubar.setGeometry(Qt.QRect(0, 0, 1236, 23))
         self.menubar.setObjectName("menubar")
-        self.menuFile = QtGui.QMenu(self.menubar)
+        self.menuFile = QtWidgets.QMenu(self.menubar)
         self.menuFile.setObjectName("menuFile")
         DigitalWindow.setMenuBar(self.menubar)
-        self.statusbar = QtGui.QStatusBar(DigitalWindow)
+        self.statusbar = QtWidgets.QStatusBar(DigitalWindow)
         self.statusbar.setObjectName("statusbar")
         DigitalWindow.setStatusBar(self.statusbar)
-        self.actionExit = QtGui.QAction(DigitalWindow)
+        self.actionExit = QtWidgets.QAction(DigitalWindow)
         self.actionExit.setObjectName("actionExit")
         self.menuFile.addAction(self.actionExit)
         self.menubar.addAction(self.menuFile.menuAction())
 
         self.retranslateUi(DigitalWindow)
-        QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), DigitalWindow.close)
-        QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), DigitalWindow.close)
-        QtCore.QMetaObject.connectSlotsByName(DigitalWindow)
+        Qt.QObject.connect(self.closeButton, Qt.SIGNAL("clicked()"), DigitalWindow.close)
+        Qt.QObject.connect(self.actionExit, Qt.SIGNAL("triggered()"), DigitalWindow.close)
+        Qt.QMetaObject.connectSlotsByName(DigitalWindow)
         DigitalWindow.setTabOrder(self.snrEdit, self.freqEdit)
         DigitalWindow.setTabOrder(self.freqEdit, self.timeEdit)
 
     def retranslateUi(self, DigitalWindow):
-        DigitalWindow.setWindowTitle(QtGui.QApplication.translate("DigitalWindow", "MainWindow", None, QtGui.QApplication.UnicodeUTF8))
-        self.sysBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "System Parameters", None, QtGui.QApplication.UnicodeUTF8))
-        self.sampleRateLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtGui.QApplication.UnicodeUTF8))
-        self.rxBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
-        self.alphaLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Alpha", None, QtGui.QApplication.UnicodeUTF8))
-        self.gainMuLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Gain mu", None, QtGui.QApplication.UnicodeUTF8))
-        self.channelModeBox.setTitle(QtGui.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtGui.QApplication.UnicodeUTF8))
-        self.snrLabel.setText(QtGui.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtGui.QApplication.UnicodeUTF8))
-        self.freqLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtGui.QApplication.UnicodeUTF8))
-        self.timeLabel.setText(QtGui.QApplication.translate("DigitalWindow", "Timing Offset", None, QtGui.QApplication.UnicodeUTF8))
-        self.pauseButton.setText(QtGui.QApplication.translate("DigitalWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
-        self.closeButton.setText(QtGui.QApplication.translate("DigitalWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
-        self.menuFile.setTitle(QtGui.QApplication.translate("DigitalWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionExit.setText(QtGui.QApplication.translate("DigitalWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
+        DigitalWindow.setWindowTitle(QtWidgets.QApplication.translate("DigitalWindow", "MainWindow", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.sysBox.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "System Parameters", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.sampleRateLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Sample Rate (sps)", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.rxBox.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "Receiver Parameters", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.alphaLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Alpha", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.gainMuLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Gain mu", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.channelModeBox.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "Channel Model Parameters", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.snrLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "SNR (dB)", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.freqLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Frequency Offset (Hz)", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.timeLabel.setText(QtWidgets.QApplication.translate("DigitalWindow", "Timing Offset", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.pauseButton.setText(QtWidgets.QApplication.translate("DigitalWindow", "Pause", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.closeButton.setText(QtWidgets.QApplication.translate("DigitalWindow", "Close", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.menuFile.setTitle(QtWidgets.QApplication.translate("DigitalWindow", "&File", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.actionExit.setText(QtWidgets.QApplication.translate("DigitalWindow", "E&xit", None, QtWidgets.QApplication.UnicodeUTF8))
 
diff --git a/gr-qtgui/apps/uhd_display.py b/gr-qtgui/apps/uhd_display.py
index 0e0c8a177d..e564e58c76 100755
--- a/gr-qtgui/apps/uhd_display.py
+++ b/gr-qtgui/apps/uhd_display.py
@@ -1,6 +1,6 @@
 #!/usr/bin/env python
 #
-# Copyright 2009,2011 Free Software Foundation, Inc.
+# Copyright 2009,2011,2018 Free Software Foundation, Inc.
 #
 # This file is part of GNU Radio
 #
@@ -31,10 +31,10 @@ 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."
+    sys.stderr.write("Error: Program requires PyQt5 and gr-qtgui.\n")
     sys.exit(1)
 
 try:
@@ -50,10 +50,10 @@ except ImportError:
 # ////////////////////////////////////////////////////////////////////
 
 
-class main_window(QtGui.QMainWindow):
+class main_window(QtWidgets.QMainWindow):
     def __init__(self, snk, fg, parent=None):
 
-        QtGui.QWidget.__init__(self, parent)
+        QtWidgets.QWidget.__init__(self, parent)
         self.gui = Ui_MainWindow()
         self.gui.setupUi(self)
 
@@ -62,28 +62,20 @@ class main_window(QtGui.QMainWindow):
         # Add the qtsnk widgets to the layout box
         self.gui.sinkLayout.addWidget(snk)
 
-        self.gui.dcGainEdit.setText(QtCore.QString("%1").arg(0.001))
+        self.gui.dcGainEdit.setText("{0}".format(0.001))
 
         # Connect up some signals
-        self.connect(self.gui.pauseButton, QtCore.SIGNAL("clicked()"),
-                     self.pauseFg)
-        self.connect(self.gui.frequencyEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.frequencyEditText)
-        self.connect(self.gui.gainEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.gainEditText)
-        self.connect(self.gui.bandwidthEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.bandwidthEditText)
-        self.connect(self.gui.amplifierEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.amplifierEditText)
-
-        self.connect(self.gui.actionSaveData, QtCore.SIGNAL("activated()"),
-                     self.saveData)
-        self.gui.actionSaveData.setShortcut(QtGui.QKeySequence.Save)
-
-        self.connect(self.gui.dcGainEdit, QtCore.SIGNAL("editingFinished()"),
-                     self.dcGainEditText)
-        self.connect(self.gui.dcCancelCheckBox, QtCore.SIGNAL("clicked(bool)"),
-                     self.dcCancelClicked)
+        self.gui.pauseButton.clicked.connect(self.pauseFg)
+        self.gui.frequencyEdit.editingFinished.connect(self.frequencyEditText)
+        self.gui.gainEdit.editingFinished.connect(self.gainEditText)
+        self.gui.bandwidthEdit.editingFinished.connect(self.bandwidthEditText)
+        self.gui.amplifierEdit.editingFinished.connect(self.amplifierEditText)
+
+        self.gui.actionSaveData.activated.connect(self.saveData)
+        self.gui.actionSaveData.setShortcut(QtWidgets.QKeySequence.Save)
+
+        self.gui.dcGainEdit.editingFinished.connect(self.dcGainEditText)
+        self.gui.dcCancelCheckBox.clicked.connect(self.dcCancelClicked)
 
     def pauseFg(self):
         if(self.gui.pauseButton.text() == "Pause"):
@@ -99,20 +91,20 @@ class main_window(QtGui.QMainWindow):
     def set_frequency(self, freq):
         self.freq = freq
         sfreq = eng_notation.num_to_str(self.freq)
-        self.gui.frequencyEdit.setText(QtCore.QString("%1").arg(sfreq))
+        self.gui.frequencyEdit.setText("{0}".format(sfreq))
 
     def set_gain(self, gain):
         self.gain = gain
-        self.gui.gainEdit.setText(QtCore.QString("%1").arg(self.gain))
+        self.gui.gainEdit.setText("{0}".format(self.gain))
 
     def set_bandwidth(self, bw):
         self.bw = bw
         sbw = eng_notation.num_to_str(self.bw)
-        self.gui.bandwidthEdit.setText(QtCore.QString("%1").arg(sbw))
+        self.gui.bandwidthEdit.setText("{0}".format(sbw))
 
     def set_amplifier(self, amp):
         self.amp = amp
-        self.gui.amplifierEdit.setText(QtCore.QString("%1").arg(self.amp))
+        self.gui.amplifierEdit.setText("{0}".format(self.amp))
 
 
     # Functions called when signals are triggered in the GUI
@@ -149,7 +141,7 @@ class main_window(QtGui.QMainWindow):
             pass
 
     def saveData(self):
-        fileName = QtGui.QFileDialog.getSaveFileName(self, "Save data to file", ".");
+        fileName = QtWidgets.QFileDialog.getSaveFileName(self, "Save data to file", ".");
         if(len(fileName)):
             self.fg.save_to_file(str(fileName))
 
@@ -170,7 +162,7 @@ class my_top_block(gr.top_block):
         self.options = options
         self.show_debug_info = True
 
-        self.qapp = QtGui.QApplication(sys.argv)
+        self.qapp = QtWidgets.QApplication(sys.argv)
 
         self.u = uhd.usrp_source(device_addr=options.address, stream_args=uhd.stream_args('fc32'))
 
@@ -218,8 +210,8 @@ class my_top_block(gr.top_block):
 
         # Get the reference pointer to the SpectrumDisplayForm QWidget
         # Wrap the pointer as a PyQt SIP object
-        #     This can now be manipulated as a PyQt4.QtGui.QWidget
-        self.pysink = sip.wrapinstance(self.snk.pyqwidget(), QtGui.QWidget)
+        #     This can now be manipulated as a PyQt5.QtWidgets.QWidget
+        self.pysink = sip.wrapinstance(self.snk.pyqwidget(), QtWidgets.QWidget)
 
         self.main_win = main_window(self.pysink, self)
 
diff --git a/gr-qtgui/apps/usrp_display_qtgui.py b/gr-qtgui/apps/usrp_display_qtgui.py
index 4c9de3a53c..89591af5fc 100644
--- a/gr-qtgui/apps/usrp_display_qtgui.py
+++ b/gr-qtgui/apps/usrp_display_qtgui.py
@@ -3,189 +3,189 @@
 # Form implementation generated from reading ui file 'usrp_display_qtgui.ui'
 #
 # Created: Thu Jul 16 22:06:24 2009
-#      by: PyQt4 UI code generator 4.4.3
+#      by: PyQt5 UI code generator 4.4.3
 #
 # WARNING! All changes made in this file will be lost!
 
-from PyQt4 import QtCore, QtGui
+from PyQt5 import Qt, QtWidgets
 
 class Ui_MainWindow(object):
     def setupUi(self, MainWindow):
         MainWindow.setObjectName("MainWindow")
         MainWindow.resize(820, 774)
-        self.centralwidget = QtGui.QWidget(MainWindow)
+        self.centralwidget = QtWidgets.QWidget(MainWindow)
         self.centralwidget.setObjectName("centralwidget")
-        self.gridLayout_2 = QtGui.QGridLayout(self.centralwidget)
+        self.gridLayout_2 = QtWidgets.QGridLayout(self.centralwidget)
         self.gridLayout_2.setObjectName("gridLayout_2")
-        self.horizontalLayout_2 = QtGui.QHBoxLayout()
+        self.horizontalLayout_2 = QtWidgets.QHBoxLayout()
         self.horizontalLayout_2.setObjectName("horizontalLayout_2")
-        self.groupBox = QtGui.QGroupBox(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.groupBox = QtWidgets.QGroupBox(self.centralwidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.groupBox.sizePolicy().hasHeightForWidth())
         self.groupBox.setSizePolicy(sizePolicy)
-        self.groupBox.setMinimumSize(QtCore.QSize(240, 150))
-        self.groupBox.setMaximumSize(QtCore.QSize(240, 16777215))
+        self.groupBox.setMinimumSize(Qt.QSize(240, 150))
+        self.groupBox.setMaximumSize(Qt.QSize(240, 16777215))
         self.groupBox.setObjectName("groupBox")
-        self.formLayoutWidget = QtGui.QWidget(self.groupBox)
-        self.formLayoutWidget.setGeometry(QtCore.QRect(10, 20, 221, 124))
+        self.formLayoutWidget = QtWidgets.QWidget(self.groupBox)
+        self.formLayoutWidget.setGeometry(Qt.QRect(10, 20, 221, 124))
         self.formLayoutWidget.setObjectName("formLayoutWidget")
-        self.formLayout = QtGui.QFormLayout(self.formLayoutWidget)
+        self.formLayout = QtWidgets.QFormLayout(self.formLayoutWidget)
         self.formLayout.setObjectName("formLayout")
-        self.frequencyLabel = QtGui.QLabel(self.formLayoutWidget)
+        self.frequencyLabel = QtWidgets.QLabel(self.formLayoutWidget)
         self.frequencyLabel.setObjectName("frequencyLabel")
-        self.formLayout.setWidget(0, QtGui.QFormLayout.LabelRole, self.frequencyLabel)
-        self.gainLabel = QtGui.QLabel(self.formLayoutWidget)
+        self.formLayout.setWidget(0, QtWidgets.QFormLayout.LabelRole, self.frequencyLabel)
+        self.gainLabel = QtWidgets.QLabel(self.formLayoutWidget)
         self.gainLabel.setObjectName("gainLabel")
-        self.formLayout.setWidget(1, QtGui.QFormLayout.LabelRole, self.gainLabel)
-        self.bandwidthLabel = QtGui.QLabel(self.formLayoutWidget)
+        self.formLayout.setWidget(1, QtWidgets.QFormLayout.LabelRole, self.gainLabel)
+        self.bandwidthLabel = QtWidgets.QLabel(self.formLayoutWidget)
         self.bandwidthLabel.setObjectName("bandwidthLabel")
-        self.formLayout.setWidget(2, QtGui.QFormLayout.LabelRole, self.bandwidthLabel)
-        self.frequencyEdit = QtGui.QLineEdit(self.formLayoutWidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.formLayout.setWidget(2, QtWidgets.QFormLayout.LabelRole, self.bandwidthLabel)
+        self.frequencyEdit = QtWidgets.QLineEdit(self.formLayoutWidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.frequencyEdit.sizePolicy().hasHeightForWidth())
         self.frequencyEdit.setSizePolicy(sizePolicy)
-        self.frequencyEdit.setMinimumSize(QtCore.QSize(120, 26))
+        self.frequencyEdit.setMinimumSize(Qt.QSize(120, 26))
         self.frequencyEdit.setObjectName("frequencyEdit")
-        self.formLayout.setWidget(0, QtGui.QFormLayout.FieldRole, self.frequencyEdit)
-        self.gainEdit = QtGui.QLineEdit(self.formLayoutWidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.formLayout.setWidget(0, QtWidgets.QFormLayout.FieldRole, self.frequencyEdit)
+        self.gainEdit = QtWidgets.QLineEdit(self.formLayoutWidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.gainEdit.sizePolicy().hasHeightForWidth())
         self.gainEdit.setSizePolicy(sizePolicy)
-        self.gainEdit.setMinimumSize(QtCore.QSize(120, 26))
+        self.gainEdit.setMinimumSize(Qt.QSize(120, 26))
         self.gainEdit.setObjectName("gainEdit")
-        self.formLayout.setWidget(1, QtGui.QFormLayout.FieldRole, self.gainEdit)
-        self.bandwidthEdit = QtGui.QLineEdit(self.formLayoutWidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.formLayout.setWidget(1, QtWidgets.QFormLayout.FieldRole, self.gainEdit)
+        self.bandwidthEdit = QtWidgets.QLineEdit(self.formLayoutWidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.bandwidthEdit.sizePolicy().hasHeightForWidth())
         self.bandwidthEdit.setSizePolicy(sizePolicy)
-        self.bandwidthEdit.setMinimumSize(QtCore.QSize(120, 26))
+        self.bandwidthEdit.setMinimumSize(Qt.QSize(120, 26))
         self.bandwidthEdit.setObjectName("bandwidthEdit")
-        self.formLayout.setWidget(2, QtGui.QFormLayout.FieldRole, self.bandwidthEdit)
-        self.amplifierLabel = QtGui.QLabel(self.formLayoutWidget)
+        self.formLayout.setWidget(2, QtWidgets.QFormLayout.FieldRole, self.bandwidthEdit)
+        self.amplifierLabel = QtWidgets.QLabel(self.formLayoutWidget)
         self.amplifierLabel.setObjectName("amplifierLabel")
-        self.formLayout.setWidget(3, QtGui.QFormLayout.LabelRole, self.amplifierLabel)
-        self.amplifierEdit = QtGui.QLineEdit(self.formLayoutWidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.formLayout.setWidget(3, QtWidgets.QFormLayout.LabelRole, self.amplifierLabel)
+        self.amplifierEdit = QtWidgets.QLineEdit(self.formLayoutWidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.amplifierEdit.sizePolicy().hasHeightForWidth())
         self.amplifierEdit.setSizePolicy(sizePolicy)
-        self.amplifierEdit.setMinimumSize(QtCore.QSize(120, 26))
+        self.amplifierEdit.setMinimumSize(Qt.QSize(120, 26))
         self.amplifierEdit.setObjectName("amplifierEdit")
-        self.formLayout.setWidget(3, QtGui.QFormLayout.FieldRole, self.amplifierEdit)
+        self.formLayout.setWidget(3, QtWidgets.QFormLayout.FieldRole, self.amplifierEdit)
         self.horizontalLayout_2.addWidget(self.groupBox)
-        self.frame_2 = QtGui.QFrame(self.centralwidget)
-        self.frame_2.setMinimumSize(QtCore.QSize(200, 0))
-        self.frame_2.setFrameShape(QtGui.QFrame.StyledPanel)
-        self.frame_2.setFrameShadow(QtGui.QFrame.Raised)
+        self.frame_2 = QtWidgets.QFrame(self.centralwidget)
+        self.frame_2.setMinimumSize(Qt.QSize(200, 0))
+        self.frame_2.setFrameShape(QtWidgets.QFrame.StyledPanel)
+        self.frame_2.setFrameShadow(QtWidgets.QFrame.Raised)
         self.frame_2.setObjectName("frame_2")
-        self.verticalLayoutWidget = QtGui.QWidget(self.frame_2)
-        self.verticalLayoutWidget.setGeometry(QtCore.QRect(10, -1, 191, 151))
+        self.verticalLayoutWidget = QtWidgets.QWidget(self.frame_2)
+        self.verticalLayoutWidget.setGeometry(Qt.QRect(10, -1, 191, 151))
         self.verticalLayoutWidget.setObjectName("verticalLayoutWidget")
-        self.verticalLayout_3 = QtGui.QVBoxLayout(self.verticalLayoutWidget)
+        self.verticalLayout_3 = QtWidgets.QVBoxLayout(self.verticalLayoutWidget)
         self.verticalLayout_3.setObjectName("verticalLayout_3")
-        self.dcCancelCheckBox = QtGui.QCheckBox(self.verticalLayoutWidget)
+        self.dcCancelCheckBox = QtWidgets.QCheckBox(self.verticalLayoutWidget)
         self.dcCancelCheckBox.setObjectName("dcCancelCheckBox")
         self.verticalLayout_3.addWidget(self.dcCancelCheckBox)
-        self.horizontalLayout = QtGui.QHBoxLayout()
+        self.horizontalLayout = QtWidgets.QHBoxLayout()
         self.horizontalLayout.setObjectName("horizontalLayout")
-        self.dcGainLabel = QtGui.QLabel(self.verticalLayoutWidget)
+        self.dcGainLabel = QtWidgets.QLabel(self.verticalLayoutWidget)
         self.dcGainLabel.setObjectName("dcGainLabel")
         self.horizontalLayout.addWidget(self.dcGainLabel)
-        self.dcGainEdit = QtGui.QLineEdit(self.verticalLayoutWidget)
+        self.dcGainEdit = QtWidgets.QLineEdit(self.verticalLayoutWidget)
         self.dcGainEdit.setObjectName("dcGainEdit")
         self.horizontalLayout.addWidget(self.dcGainEdit)
         self.verticalLayout_3.addLayout(self.horizontalLayout)
-        spacerItem = QtGui.QSpacerItem(20, 40, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Expanding)
+        spacerItem = QtWidgets.QSpacerItem(20, 40, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Expanding)
         self.verticalLayout_3.addItem(spacerItem)
         self.horizontalLayout_2.addWidget(self.frame_2)
-        spacerItem1 = QtGui.QSpacerItem(40, 20, QtGui.QSizePolicy.Expanding, QtGui.QSizePolicy.Minimum)
+        spacerItem1 = QtWidgets.QSpacerItem(40, 20, QtWidgets.QSizePolicy.Expanding, QtWidgets.QSizePolicy.Minimum)
         self.horizontalLayout_2.addItem(spacerItem1)
-        self.verticalLayout = QtGui.QVBoxLayout()
+        self.verticalLayout = QtWidgets.QVBoxLayout()
         self.verticalLayout.setObjectName("verticalLayout")
-        spacerItem2 = QtGui.QSpacerItem(20, 80, QtGui.QSizePolicy.Minimum, QtGui.QSizePolicy.Fixed)
+        spacerItem2 = QtWidgets.QSpacerItem(20, 80, QtWidgets.QSizePolicy.Minimum, QtWidgets.QSizePolicy.Fixed)
         self.verticalLayout.addItem(spacerItem2)
-        self.pauseButton = QtGui.QPushButton(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.pauseButton = QtWidgets.QPushButton(self.centralwidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.pauseButton.sizePolicy().hasHeightForWidth())
         self.pauseButton.setSizePolicy(sizePolicy)
         self.pauseButton.setObjectName("pauseButton")
         self.verticalLayout.addWidget(self.pauseButton)
-        self.closeButton = QtGui.QPushButton(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Fixed, QtGui.QSizePolicy.Fixed)
+        self.closeButton = QtWidgets.QPushButton(self.centralwidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Fixed, QtWidgets.QSizePolicy.Fixed)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(0)
         sizePolicy.setHeightForWidth(self.closeButton.sizePolicy().hasHeightForWidth())
         self.closeButton.setSizePolicy(sizePolicy)
-        self.closeButton.setMinimumSize(QtCore.QSize(75, 0))
+        self.closeButton.setMinimumSize(Qt.QSize(75, 0))
         self.closeButton.setObjectName("closeButton")
         self.verticalLayout.addWidget(self.closeButton)
         self.horizontalLayout_2.addLayout(self.verticalLayout)
         self.gridLayout_2.addLayout(self.horizontalLayout_2, 1, 0, 1, 1)
-        self.verticalLayout_2 = QtGui.QVBoxLayout()
+        self.verticalLayout_2 = QtWidgets.QVBoxLayout()
         self.verticalLayout_2.setObjectName("verticalLayout_2")
-        self.frame = QtGui.QFrame(self.centralwidget)
-        sizePolicy = QtGui.QSizePolicy(QtGui.QSizePolicy.Preferred, QtGui.QSizePolicy.Preferred)
+        self.frame = QtWidgets.QFrame(self.centralwidget)
+        sizePolicy = QtWidgets.QSizePolicy(QtWidgets.QSizePolicy.Preferred, QtWidgets.QSizePolicy.Preferred)
         sizePolicy.setHorizontalStretch(0)
         sizePolicy.setVerticalStretch(1)
         sizePolicy.setHeightForWidth(self.frame.sizePolicy().hasHeightForWidth())
         self.frame.setSizePolicy(sizePolicy)
-        self.frame.setMinimumSize(QtCore.QSize(800, 550))
-        self.frame.setFrameShape(QtGui.QFrame.StyledPanel)
-        self.frame.setFrameShadow(QtGui.QFrame.Raised)
+        self.frame.setMinimumSize(Qt.QSize(800, 550))
+        self.frame.setFrameShape(QtWidgets.QFrame.StyledPanel)
+        self.frame.setFrameShadow(QtWidgets.QFrame.Raised)
         self.frame.setObjectName("frame")
-        self.gridLayout = QtGui.QGridLayout(self.frame)
+        self.gridLayout = QtWidgets.QGridLayout(self.frame)
         self.gridLayout.setObjectName("gridLayout")
-        self.sinkLayout = QtGui.QHBoxLayout()
+        self.sinkLayout = QtWidgets.QHBoxLayout()
         self.sinkLayout.setObjectName("sinkLayout")
         self.gridLayout.addLayout(self.sinkLayout, 0, 0, 1, 1)
         self.verticalLayout_2.addWidget(self.frame)
         self.gridLayout_2.addLayout(self.verticalLayout_2, 0, 0, 1, 1)
         MainWindow.setCentralWidget(self.centralwidget)
-        self.menubar = QtGui.QMenuBar(MainWindow)
-        self.menubar.setGeometry(QtCore.QRect(0, 0, 820, 24))
+        self.menubar = QtWidgets.QMenuBar(MainWindow)
+        self.menubar.setGeometry(Qt.QRect(0, 0, 820, 24))
         self.menubar.setObjectName("menubar")
-        self.menuFile = QtGui.QMenu(self.menubar)
+        self.menuFile = QtWidgets.QMenu(self.menubar)
         self.menuFile.setObjectName("menuFile")
         MainWindow.setMenuBar(self.menubar)
-        self.statusbar = QtGui.QStatusBar(MainWindow)
+        self.statusbar = QtWidgets.QStatusBar(MainWindow)
         self.statusbar.setObjectName("statusbar")
         MainWindow.setStatusBar(self.statusbar)
-        self.actionExit = QtGui.QAction(MainWindow)
+        self.actionExit = QtWidgets.QAction(MainWindow)
         self.actionExit.setObjectName("actionExit")
-        self.actionSaveData = QtGui.QAction(MainWindow)
+        self.actionSaveData = QtWidgets.QAction(MainWindow)
         self.actionSaveData.setObjectName("actionSaveData")
         self.menuFile.addAction(self.actionSaveData)
         self.menuFile.addAction(self.actionExit)
         self.menubar.addAction(self.menuFile.menuAction())
 
         self.retranslateUi(MainWindow)
-        QtCore.QObject.connect(self.closeButton, QtCore.SIGNAL("clicked()"), MainWindow.close)
-        QtCore.QObject.connect(self.actionExit, QtCore.SIGNAL("triggered()"), MainWindow.close)
-        QtCore.QMetaObject.connectSlotsByName(MainWindow)
+        Qt.QObject.connect(self.closeButton, Qt.SIGNAL("clicked()"), MainWindow.close)
+        Qt.QObject.connect(self.actionExit, Qt.SIGNAL("triggered()"), MainWindow.close)
+        Qt.QMetaObject.connectSlotsByName(MainWindow)
 
     def retranslateUi(self, MainWindow):
-        MainWindow.setWindowTitle(QtGui.QApplication.translate("MainWindow", "USRP Display", None, QtGui.QApplication.UnicodeUTF8))
-        self.groupBox.setTitle(QtGui.QApplication.translate("MainWindow", "Receiver Parameters", None, QtGui.QApplication.UnicodeUTF8))
-        self.frequencyLabel.setText(QtGui.QApplication.translate("MainWindow", "Frequency (Hz)", None, QtGui.QApplication.UnicodeUTF8))
-        self.gainLabel.setText(QtGui.QApplication.translate("MainWindow", "RF Gain", None, QtGui.QApplication.UnicodeUTF8))
-        self.bandwidthLabel.setText(QtGui.QApplication.translate("MainWindow", "Bandwidth", None, QtGui.QApplication.UnicodeUTF8))
-        self.amplifierLabel.setText(QtGui.QApplication.translate("MainWindow", "Amplifier", None, QtGui.QApplication.UnicodeUTF8))
-        self.dcCancelCheckBox.setText(QtGui.QApplication.translate("MainWindow", "Cancel DC", None, QtGui.QApplication.UnicodeUTF8))
-        self.dcGainLabel.setText(QtGui.QApplication.translate("MainWindow", "DC Canceller Gain", None, QtGui.QApplication.UnicodeUTF8))
-        self.pauseButton.setText(QtGui.QApplication.translate("MainWindow", "Pause", None, QtGui.QApplication.UnicodeUTF8))
-        self.closeButton.setText(QtGui.QApplication.translate("MainWindow", "Close", None, QtGui.QApplication.UnicodeUTF8))
-        self.menuFile.setTitle(QtGui.QApplication.translate("MainWindow", "&File", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionExit.setText(QtGui.QApplication.translate("MainWindow", "E&xit", None, QtGui.QApplication.UnicodeUTF8))
-        self.actionSaveData.setText(QtGui.QApplication.translate("MainWindow", "&Save Data", None, QtGui.QApplication.UnicodeUTF8))
+        MainWindow.setWindowTitle(QtWidgets.QApplication.translate("MainWindow", "USRP Display", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.groupBox.setTitle(QtWidgets.QApplication.translate("MainWindow", "Receiver Parameters", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.frequencyLabel.setText(QtWidgets.QApplication.translate("MainWindow", "Frequency (Hz)", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.gainLabel.setText(QtWidgets.QApplication.translate("MainWindow", "RF Gain", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.bandwidthLabel.setText(QtWidgets.QApplication.translate("MainWindow", "Bandwidth", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.amplifierLabel.setText(QtWidgets.QApplication.translate("MainWindow", "Amplifier", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.dcCancelCheckBox.setText(QtWidgets.QApplication.translate("MainWindow", "Cancel DC", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.dcGainLabel.setText(QtWidgets.QApplication.translate("MainWindow", "DC Canceller Gain", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.pauseButton.setText(QtWidgets.QApplication.translate("MainWindow", "Pause", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.closeButton.setText(QtWidgets.QApplication.translate("MainWindow", "Close", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.menuFile.setTitle(QtWidgets.QApplication.translate("MainWindow", "&File", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.actionExit.setText(QtWidgets.QApplication.translate("MainWindow", "E&xit", None, QtWidgets.QApplication.UnicodeUTF8))
+        self.actionSaveData.setText(QtWidgets.QApplication.translate("MainWindow", "&Save Data", None, QtWidgets.QApplication.UnicodeUTF8))
 
-- 
2.11.0