Using Python3-Spyder in Anaconda on OSX 10.13.4
I have a Qt Designer App that is working fine. When I run it however I get this error in the Python Console
File ".../sitecustomize.py", line 102, in execfile exec(compile(f.read(), filename, 'exec'), namespace)
File ".../exercises/hello_world/hello_code.py", line 34, in sys.exit(app.exec_())
SystemExit: -1
Is this a problem?
The main code is below where hello_world is a Qt Designer ui>>py file
import sys
from PyQt5 import QtCore
from PyQt5.QtWidgets import QMainWindow, QApplication
from hello_world import Ui_MainWindow
class MainWindow(QMainWindow):
def __init__(self):
super(MainWindow, self).__init__()
# Set up the user interface from Designer.
self.ui = Ui_MainWindow()
self.ui.setupUi(self)
#
# add text to QTextBrowser
#
self.ui.textBrowser.setText("Hello World \n")
self.ui.textBrowser.append("\t Hello World Again")
self.ui.textBrowser.setAlignment(QtCore.Qt.AlignRight)
self.show()
app = QApplication(sys.argv)
window = MainWindow()
sys.exit(app.exec_())