No such slot C/C++ Origin: Application & API OSI layer 7 · Application Last updated 2 Dec 2026

QObject::connect: No such slot MyWidget::onClicked() / No such signal

Qt's string-based connect could not find the signal or slot at run time.

Exact message you may see QObject::connect: No such slotQObject::connect: No such signalconnect No such slot Qt
Seen on: C++ Qt

Meaning

With the old SIGNAL()/SLOT() macros the check happens at run time, and a mismatch prints a warning only. Misspelled names, wrong argument types or a missing slots/Q_OBJECT give the message.

Common causes

  • Slot or signal name or parameter types misspelled
  • Class lacks Q_OBJECT
  • Method not declared in a slots: section (Qt 4 style)
  • Connecting before the object exists

⚡ Quick fix

  1. Use the function-pointer syntax: connect(btn, &QPushButton::clicked, this, &MyWidget::onClicked)
  2. Add Q_OBJECT and rebuild
  3. Check parameter types exactly

Detailed fix by platform

C++

  1. connect(sender, &Sender::valueChanged, receiver, &Receiver::setValue); — mismatches become compile errors

How to diagnose

  1. Syntax — String or pointer?
  2. Q_OBJECT — Present?
  3. Types — Parameter types match?

🔧 Still not fixed?

Many errors look alike. If the steps above didn’t solve it, one of these is probably what you’re facing:

Where this error sits

Origin: Application & API. Errors that are often confused with or caused by this one (click to open):

Bus error — C/C++: Bus error (core dumped) — SIGBUS from misaligned access or a bad memory-mapped file (C/C++)Bus errorCould not load the Qt platform plugin xcb — qt.qpa.plugin: Could not load the Qt platform plugin "xcb" in "" even though it was found (C/C++)Could not load the Qt…Floating point exception — C/C++: Floating point exception (core dumped) — SIGFPE, usually integer division by zero (C/C++)Floating point except…Qt6Config.cmake — CMake Error: Could not find a package configuration file provided by "Qt6" (Qt6Config.cmake) (C/C++)Qt6Config.cmakeSegmentation fault — C/C++: Segmentation fault (core dumped) — SIGSEGV from a null, dangling or out-of-bounds pointer (C/C++)Segmentation faultSIGPIPE — Program terminated with signal SIGPIPE, Broken pipe (C/C++)SIGPIPEstack overflow — C/C++: stack overflow — infinite recursion or huge local array (Segmentation fault, 0xC00000FD) (C/C++)stack overflowstack smashing detected — C/C++: *** stack smashing detected ***: terminated — buffer overflow on the stack (C/C++)stack smashing detect…No such s…

Explore the map of this error Full error map →

🧠 Still stuck? Analyze your error

Paste the full message, response headers or stack trace — we'll detect the platform and point to the most likely cause.

💬 What worked for others

No tips yet — did something else fix this for you?

Share what worked for you

Tips are checked by an editor before they appear. Links are removed.