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

**Code:** `No such slot` · **Category:** C/C++ · **Seen on:** C++, Qt

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

## 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?

---
Source: [WhatIsMyError](https://whatismyerror.com/errors/cpp/qt-connect-no-such-slot)
