System: 15.10 (Wily Werewolf) x64
code:
from PyQt5 import QtCore, QtGui, QtWidgets
class Ui_Form(object):
def setupUi(self, Form):
Form.setObjectName("Form")
Form.resize(400, 300)
self.pushButton = QtWidgets.QPushButton(Form)
self.pushButton.setGeometry(QtCore.QRect(120, 120, 85, 26))
self.pushButton.setObjectName("pushButton")
self.retranslateUi(Form)
QtCore.QMetaObject.connectSlotsByName(Form)
def retranslateUi(self, Form):
_translate = QtCore.QCoreApplication.translate
Form.setWindowTitle(_translate("Form", "Form"))
self.pushButton.setText(_translate("Form", "PushButton"))
if __name__ == '__main__':
app = QtGui.QApplication(sys.argv)
ex = Ui_Form()
ex.show()
sys.exit(app.exec_())
I get the following error:
app = QtGui.QApplication(sys.argv)
AttributeError: 'module' object has no attribute 'QApplication'
Basically, I developed a GUI with Qt5 and then used pyuic5. I already installed PyQt5, not sure if the installation went as expected.
User interface design:

Any help would be greatly appreciated.
source
share