Hi.
I writing app (text editor), where I need to commit changes by clicking a return/enter key.
To edit text I using QPlainTextEdit, but my shortcut not working.
I don't need to have new lines in text.
I tried to replace QPlainTextEdit with QLineEdit, but QLineEdit don't have line wrapping.
How can I implement this shortcut or how can I get line wrapping in QLineEdit.
Sorry for my bad english.
Code for shortcut and QLineEdit:
connect(shortcut, SIGNAL(activated()), this, SLOT(confirm()));
QShortcut* shortcut = new QShortcut(QKeySequence("Return"), ui->lineEdit);
connect(shortcut, SIGNAL(activated()), this, SLOT(confirm()));
To copy to clipboard, switch view to plain text mode
Bookmarks