Hello I have a QTDesigner UI file HelloWorld.ui which I am trying to import into a project and execute.
The Project includes HelloWorld.ui file which has been converted into HelloWorld_ui.py using Pyuic5.
The following is the code of app.py
from PyQt5.QtWidgets import *
from PyQt5.QtCore import *
from PyQt5.QtGui import *
import sys
import HelloWorld_ui
class HelloWorld(QDialog, HelloWorld_ui.Ui_HelloWorld):
def __init__(self):
QDialog.__init__(self)
self.setupUi(self)
app = QApplication(sys.argv)
helloworld = HelloWorld()
helloworld.show()
app.exec_()
The following is the error code
Traceback (most recent call last):
File "/Users/rrpolak/Downloads/Pyt/app.py", line 11, in <module>
class HelloWorld(QDialog, HelloWorld_ui.Ui_HelloWorld):
AttributeError: module 'HelloWorld_ui' has no attribute 'Ui_HelloWorld'
Process finished with exit code 1
I am trying to understand what is the correct way to call these files in the python program. Any help is appreciated.
The project file is at https://drive.google.com/open?id=18tjLPiCZxTbKaiZShtgu90KyXcFukr6V
I am using PyQt5/Python3.6/Mac.


