Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8868919
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:22:00+00:00 2026-06-14T17:22:00+00:00

If I connect the same signal with the same slot twice, would this cause

  • 0

If I connect the same signal with the same slot twice, would this cause a bug? e.g the slot get called twice when the signal is emitted?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T17:22:01+00:00Added an answer on June 14, 2026 at 5:22 pm

    Short answer: Your slot would be called twice.

    Whether this causes bugs or is the desired behaviour depends on your application of course.

    In most cases it is probably not wanted, so to prevent this you can either track your connections, use disconnect first or if you are using at least Qt 4.6 there is a new connection type Qt::UniqueConnection which prevents duplicate connections automatically and otherwise behaves like Qt::AutoConnection, see connection types and a blog post about the new unique type.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

i know i can connect multiple slots to the same signal. but Can I
Currently, my code is like this: for control in self.controls(): self.connect(control, SIGNAL('clicked()'), lambda: self.button(control.objectName()))
I am trying to connect to a signal in this way: QObject::connect(myObj, SIGNAL(mySignal(std::list<MyClass*> myList)),
I'm trying to write a java program to connect to the same MySQL database
In my Java application, I need to connect to the same host using SSL,
i'm looking to connect to a WCF service from w/in the same .exe from
In short, I get following error: QObject::connect: Cannot queue arguments of type 'cv::Mat' (Make
I have been trying to get ruby 1.8.6 to connect to a MS SQL
The title describes my problem quite well. The offending line of code: connect(table, SIGNAL(cellChanged(row,
I have a signal and a slot that should fit together quite nicely. class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.