0
I developed a Pyqt window with Dialog with Buttons Right template but calling me in my main class gives me an attribute error. I saw in the YT video that the guy used Main Window as a template and he just instated Main_main class (Qtgui.Qmainwindow): I already tried to do the same for my template and nothing. Just 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 me the following error:
Attributeerror: 'module' Object has no attribute 'Qdialogwithbuttonsright'
Watch out for indentation when collecting code - Yours has a syntax error. Note that you should not keep trying to correct the code after pasting - select all the pasted code and press the formatting button marked as
{}
– jsbueno