Why is my slot not being called?
Posted
by Jen
on Stack Overflow
See other posts from Stack Overflow
or by Jen
Published on 2010-06-10T02:27:45Z
Indexed on
2010/06/10
2:32 UTC
Read the original article
Hit count: 313
I have this class:
class CustomEdit : public QTextEdit
{
Q_GADGET
public:
CustomEdit(QWidget* parent);
public slots:
void onTextChanged ();
};
CustomEdit::CustomEdit(QWidget* parent)
: QTextEdit(parent)
{
connect( this, SIGNAL(textChanged()), this, SLOT(onTextChanged()));
}
void CustomEdit::onTextChanged ()
{
// ... do stuff
}
The onTextChanged
method is never called when I type text into the edit control.
What am I missing?
© Stack Overflow or respective owner