Answer the question
In order to leave comments, you need to log in
How to run a file on a window in python?
Sorry for the stupid question, but I don't know how to do it.
class Ui_MainWindow(object):
def setupUi(self, MainWindow):
MainWindow.setObjectName("MainWindow")
MainWindow.resize(717, 550)
import sys
from PyQt5 import QtGui
from output import Ui_MainWindow
def main():
qApp = QtGui.QApplication(sys.argv)
aw = Ui_MainWindow()
aw.show()
sys.exit(qApp.exec_())
if __name__ == '__main__':
main()
Traceback (most recent call last):
File "C:/Users/Nicee/Desktop/Ni/newNu/Main.py", line 3, in <module>
from output import Ui_MainWindow
File "C:\Users\Nicee\Desktop\Ni\newNu\output.py", line 11, in <module>
class Ui_MainWindow(QtGui.QMainWindow):
AttributeError: module 'PyQt5.QtGui' has no attribute 'QApplication'
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question