Skip to content

Commit ef1b94d

Browse files
committed
changed imports for compatibility with pyside2
1 parent 187b802 commit ef1b94d

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

accessing-metadata-gitlab/main.py

Whitespace-only changes.

image_in_window_screensaver/bad_practise_global.py

Whitespace-only changes.

note_point_extractor/__main__.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,17 @@
11
#!/usr/bin/python3
22

3-
from PyQt4 import QtGui
4-
from PyQt4.QtCore import *
5-
from PyQt4.QtGui import *
3+
# from PyQt4 import QtGui
4+
# from PyQt4.QtCore import *
5+
# from PyQt4.QtGui import *
66

77
import sys
8+
from PySide2.QtWidgets import QMainWindow, QApplication
89

910
from gui import gui
1011
from library import text_handler
1112

1213

13-
class NoteExtractor(QtGui.QMainWindow, gui.Ui_MainWindow):
14+
class NoteExtractor(QMainWindow, gui.Ui_MainWindow):
1415
def __init__(self, parent=None):
1516
super(NoteExtractor, self).__init__(parent)
1617
self.setupUi(self)
@@ -34,10 +35,10 @@ def setcontents(self, value: str) -> None:
3435

3536

3637
def main():
37-
app = QtGui.QApplication(sys.argv)
38+
app = QApplication(sys.argv)
3839
form = NoteExtractor()
3940
form.show()
40-
app.exec()
41+
sys.exit(app.exec_())
4142

4243

4344
if __name__ == '__main__':

0 commit comments

Comments
 (0)