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

  • SEARCH
  • Home
  • 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 9051171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T12:50:34+00:00 2026-06-16T12:50:34+00:00

Windows 7 SP1 MSVS 2010 Qt libraries 4.8.4 for Windows (VS 2010) Visual Studio

  • 0

Windows 7 SP1
MSVS 2010
Qt libraries 4.8.4 for Windows (VS 2010)
Visual Studio Add-in 1.1.11 for Qt4

I, at first, couldn’t figure out why this slot didn’t fire:

connect (lineEdit, SIGNAL(textChanged(const QString &)),
         this, SLOT(enableFindButton(const Qstring &)));

A diff made it clear: Qstring should be QString.

My question: Why did it compile? In fact, it will compile with this:

connect (lineEdit, SIGNAL(textChanged(const nonsense &)),
         this, SLOT(enableFindButton(const more_nonsense &)));

Is this expected behavior? Why wouldn’t this raise an error?

  • 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-16T12:50:35+00:00Added an answer on June 16, 2026 at 12:50 pm

    As far as I know and understand how works Qt, the connection lines works on runtime, not in compilation time. This means that all the operations needed to connect a signal and a slot are performed when the code flow reach that part.

    Remember something important about Qt, some of the calls are only macros, not C++ functions. For example, the line “Q_OBJECT” you should add in your class declarations to enable the signals and slots mechanims works, is a macro. Also, the connect call is a macro (…), emit is a macro, etc. Those calls expand into real code once MOC (a pre-compiler, translates Qt macros into real code) analize your code.

    Also, the signal/slot mechanism, I repeat, as far as I know, works on runtime, not compilation time. If you read the documentation of the connect macro, it says that the “SIGNAL” and “SLOT” macros you place there, convert the stuff you put there into a string, obviously, with some kind of format, that maybe is too complex to used by hand, so, since it is a string working there, the compilation can’t check if the string is correct or not, that is checked on runtime.

    I hope my bad english let you understand me, and I hope my knowledge is big enough to not being saying (too much) incorrect tinghs.

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

Sidebar

Related Questions

I have a Windows 7 machine with Visual Studio 2005 SP1 installed. Using this,
This is a new install of Visual Studio 2008 SP1 on Windows 2008 (original)
I recently received a new workstation with Windows 7 SP1 and Visual Studio 2010
How stable is Visual Studio 2010 compared with VS2008 SP1 on Windows 7?
Environment: Windows 7 SP1 Visual Studio 2010 Ultimate SP1 .NET 4.0 I have a
I'm currently trying to build subversion 1.7.3 with Visual Studio 2010 SP1 on Windows
I'm running Visual Studio 2008 sp1 on Windows 7 Build 7100 32bit. I've never
I'm using Windows Vista Ultimate and today I've installed the Visual Studio 2008 SP1,
Windows 7 64 SP1, Boost 1.42, MS VS 2010 Ultimate, C++ This stripped down
Windows 7 SP1 MSVS 2010 Qt 4.8.4 I'm experimenting with the Qt Syntax Highlighter

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.