a little bit tricky, but works fine 
...
connect(le,
SIGNAL(textEdited
(const QString &)),
SLOT(toUpper(const QString &)));
...
void Test
::toUpper(const QString &text
) {
QLineEdit *le
= qobject_cast<QLineEdit
*>
(sender
());
if (!le)
return;
le->setText(text.toUpper());
}
...
connect(le, SIGNAL(textEdited(const QString &)), SLOT(toUpper(const QString &)));
...
void Test::toUpper(const QString &text)
{
QLineEdit *le = qobject_cast<QLineEdit *>(sender());
if (!le)
return;
le->setText(text.toUpper());
}
To copy to clipboard, switch view to plain text mode
Bookmarks