Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for Python
  4. using qt designer to connect a widget to a method

using qt designer to connect a widget to a method

Scheduled Pinned Locked Moved Unsolved Qt for Python
4 Posts 2 Posters 174 Views
  • 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.
  • J Offline
    J Offline
    jdauthre
    wrote on 1 Mar 2025, 18:04 last edited by
    #1

    I am trying to move from wxpython (wxglade) to pyqt designer. I know this is probably a stupid question, but I cannot find the answer. I want to connect a button widget to a method, The tutorials show how to connect to other widgets in the main window but thats it. Do I have to resort to hand coding, my apps tend to have quite a lot of widgets.

    Thanks in advance

    1 Reply Last reply
    0
    • S Offline
      S Offline
      SGaist
      Lifetime Qt Champion
      wrote on 1 Mar 2025, 19:50 last edited by SGaist 3 Mar 2025, 13:06
      #2

      Hi and welcome to devnet,

      You can use the auto connect feature but it has proven a bit fragile over time. So yes, better do it in code.

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

      J 1 Reply Last reply 3 Mar 2025, 12:45
      1
      • S SGaist
        1 Mar 2025, 19:50

        Hi and welcome to devnet,

        You can use the auto connect feature but it has proven a bit fragile over time. So yes, better do it in code.

        J Offline
        J Offline
        jdauthre
        wrote on 3 Mar 2025, 12:45 last edited by
        #3

        @SGaist Thanks! That is a bit of a drawback, but can't be helped.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 3 Mar 2025, 19:52 last edited by
          #4

          You're welcome !

          I'll put it in a different way: it gives you more control and it's also easier to reason about when reading the code.

          In any case, since you have the answer you sought, please mark the thread as solved using the Topic Tools button or the three dotted menu beside the answer your deem correct so other forum users may know a solution has been found :-)

          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
          0

          3/4

          3 Mar 2025, 12:45

          • Login

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