Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved How to solve this error?

    Qt for Python
    2
    11
    307
    Loading More Posts
    • 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.
    • B
      Beginner_to_code last edited by Beginner_to_code

      This post is deleted!
      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        Please use coding tags around your code.

        Your clicked method is a free function. The signature of the signal you are using contains a Boolean parameter hence the error you get.

        Interested in AI ? www.idiap.ch
        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

        B 1 Reply Last reply Reply Quote 0
        • B
          Beginner_to_code @SGaist last edited by

          This post is deleted!
          1 Reply Last reply Reply Quote 0
          • SGaist
            SGaist Lifetime Qt Champion last edited by

            Why do you have slots as free functions in the first place ? Especially when you are accessing your class internal objects.

            Fix that and it will work better.

            Interested in AI ? www.idiap.ch
            Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

            B 1 Reply Last reply Reply Quote 0
            • B
              Beginner_to_code @SGaist last edited by

              @SGaist I am a beginner to pyqt5.I don't know how to do that....

              1 Reply Last reply Reply Quote 0
              • SGaist
                SGaist Lifetime Qt Champion last edited by

                Then you should start by reading the documentation and maybe follow a tutorial.

                Make your slot a proper member of your class.

                Interested in AI ? www.idiap.ch
                Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                B 1 Reply Last reply Reply Quote 1
                • B
                  Beginner_to_code @SGaist last edited by

                  @SGaist Inside that class i need to define the slot right?

                  1 Reply Last reply Reply Quote 0
                  • SGaist
                    SGaist Lifetime Qt Champion last edited by

                    That's what I wrote yes.

                    Interested in AI ? www.idiap.ch
                    Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                    B 2 Replies Last reply Reply Quote 0
                    • B
                      Beginner_to_code @SGaist last edited by

                      @SGaist Will u refer any book or tutorials?

                      SGaist 1 Reply Last reply Reply Quote 0
                      • B
                        Beginner_to_code @SGaist last edited by

                        @SGaist Thanks..

                        1 Reply Last reply Reply Quote 0
                        • SGaist
                          SGaist Lifetime Qt Champion @Beginner_to_code last edited by

                          @Beginner_to_code said in How to solve this error?:

                          @SGaist Will u refer any book or tutorials?

                          I already did in this answer:

                          @SGaist said in How to solve this error?:

                          Then you should start by reading the documentation and maybe follow a tutorial.

                          Make your slot a proper member of your class.

                          Interested in AI ? www.idiap.ch
                          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post