Python Forum

Full Version: My WIndow isnt opening at all.
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
import sys
from PyQt5.QtWidgets import *


class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        self.showMaximized()


app = QApplication(sys.argv)
QApplication.setApplicationName('Chrome Killer')
it is supposed to open a black window called "Chrome Killer" but it does nothing i dont know what to do. Please help.
You didn't create an instance of MainWindow or call app.exec_
import sys

from PyQt5.QtWidgets import *


class MainWindow(QMainWindow):
    def __init__(self):
        super(MainWindow, self).__init__()
        self.showMaximized()


app = QApplication(sys.argv)
QApplication.setApplicationName('Chrome Killer')
mainwindow = MainWindow()
sys.exit(app.exec_())