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 835561
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:50:39+00:00 2026-05-15T04:50:39+00:00

A senior developer in my team used traditional C-style callbacks in our Qt application

  • 0

A senior developer in my team used traditional C-style callbacks in our Qt application instead of using Qt signal/slot mechanisms.

My first reflex would be to replace his code and use Qt signal/slot instead.

Is there any good reasons to use callbacks in a Qt application/library?

Thanks.

  • 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-05-15T04:50:40+00:00Added an answer on May 15, 2026 at 4:50 am

    I think the better approach would be to embrace the framework you are using and use signal/slots.

    That being said, if the code in question works, and is not ugly or causing problems, then you may be best to leave it alone.

    Consulting the Signal/Slot documentation describes why the Signal/Slot approach is better:

    Callbacks have two fundamental flaws:
    Firstly, they are not type-safe. We
    can never be certain that the
    processing function will call the
    callback with the correct arguments.
    Secondly, the callback is strongly
    coupled to the processing function
    since the processing function must
    know which callback to call.

    Do be aware of the following though:

    Compared to callbacks, signals and slots are slightly slower because of the increased flexibility they provide

    The speed probably doesn’t matter for most cases, but there may be some extreme cases of repeated calling that makes a difference.

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

Sidebar

Related Questions

The senior developer (and the only person experienced with Django in our company) has
I'm a senior-ish C# developer used to ASP.NET & IIS, but a project's come
I am an senior-slash-advanced C#/.NET developer, currently using 3.5 Framework with WPF/WCF and Silverlight
Another chapter from the arguments between myself and the other senior developer series :P
What should someone know as an Entry Level, Mid-level, and Senior Developer working with
I am a senior level developer but I haven't had a lot of formal
A fellow developer and I are putting together a proposal for a new application,
Working in a team environment how would you handle a developer that refuses to
A senior developer at my workstation codes like this: table {border-collapse: collapse;border-spacing: 0;} fieldset,img
I recently had my code reviewed by a senior developer in my company. He

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.