Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

too many positional arguments for constructor call



  • this is my wizard:

    class Wizard(QWizard):
        def __init__(self, parent=None, window_flags=None):
            super(Wizard, self).__init__(parent, window_flags)
    
            self.addPage(Page())
    

    and this is in the window class where i create the wizard:

        def __create_wizard(self):
            self.__wizard = Wizard(self, Qt.Dialog)
    

    on calling the wizard constructor i get the error in this topic's title.

    what am i doing wrong?



  • found out the reason. it should be window_flags=Qt.WindowFlags(), not window_flags=None


Log in to reply