I developed a dialog in PyQt with Dialog with Buttons Right template, but when calling in my main class it returns an attribute error. I saw in the YT video that the guy used the Main Window as a template and he just installed Main_principal class (QtGui.QMainWindow): I already tried to do the same for my template and nothing. Follow my code
import sys
from PyQt5 import QtCore, QtGui
from sistema import Ui_Dialog
class Main_principal(QtGui.QDialogwithButtonsRight):
def _init_(self):
QtGui.QDialogwithButtonsRight.__init__(self)
self.ui = Ui_Dialog()
self.ui.setupUi(self)
app = QtGui.QApplication(sys.argv)
programa = Main()
programa.show()
sys.exit(app.exec_())
and returns the following error:
AttributeError: 'module' object has no attribute 'QDialogwithButtonsRight'