
Originally Posted by
Fallen_
Hi, can someone help me with this code?
I don't know if it connects or anything it just doesnt write anything to the "QTextEdit* read"
mainwindow.h
connect(write, SIGNAL(textChanged(const QString&)), this, SLOT(sendMessage()));
}
connect(write, SIGNAL(textChanged(const QString&)), this, SLOT(sendMessage()));
}
To copy to clipboard, switch view to plain text mode
Hi,
This part is problemmatic I guess. The signal and corresponding slot should have the same arguments. The connection should be like
connect(write,
SIGNAL(textChanged
(QString)),
this,
SLOT(sendMessage
(QString)));
connect(write, SIGNAL(textChanged(QString)), this, SLOT(sendMessage(QString)));
To copy to clipboard, switch view to plain text mode
Your slot should be declared as
void sendMessage(const QString& dummy)
I hope this solves your problem.
Bookmarks