Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Language Bindings
  4. too many positional arguments for constructor call
Forum Updated to NodeBB v4.3 + New Features

too many positional arguments for constructor call

Scheduled Pinned Locked Moved Solved Language Bindings
2 Posts 1 Posters 2.0k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    user4592357
    wrote on last edited by
    #1

    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?

    U 1 Reply Last reply
    0
    • U user4592357

      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?

      U Offline
      U Offline
      user4592357
      wrote on last edited by
      #2

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

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved