Qt Forum

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

    Update: Forum Guidelines & Code of Conduct

    Unsolved Disable connect-by-name

    General and Desktop
    3
    3
    1750
    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.
    • M
      michelson last edited by

      Can one disable connect-by-name signal-slot function? I would like to set everything by myself i.e. to avoid double connections messing up everything.

      1 Reply Last reply Reply Quote 0
      • Chris Kawa
        Chris Kawa Moderators last edited by

        What do you mean by connect-by-name? And what do you mean by "disable"? There's no notion of disabling functions in c++;

        If you want to avoid doubled connections you can pass Qt::UniqueConnection as the last param of connect.

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

          Hi
          Do you mean the auto connect from Designer UI files?
          Sò buttons work with no connect code?
          It is based on the slots look like this
          void on_widget name_signalname

          so if you rename it to not follow this pattern, it won't be auto connected.

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