I try to build an interface. I installed PyQt 5 (5.6.0) in Anaconda 3.6 (Python 3.6.3). I use Spyder (3.2.6) as my compiler.
import sys
from PyQt5 import QtGui,QtCore
from PyQt5.QtWidgets import QPushButton,QApplication,QMainWindow
class Window(QMainWindow):
def __init__(self):
super().__init__()
self.setGeometry(50,50,500,300)
self.setWindowTitle("PyQt!")
self.show()
if __name__ == "__main__":
def run():
App=QApplication(sys.argv)
Window()
App.exec()
run()
There is no error while running this command. However, there is no output too. Shouldn't I see a window of 500 pixels x 300 pixels at (50, 50)?
Thanks for your insights :)