|
|
Hi all
I'm trying to obtain this behaviour on a QLineEdit:
1) when, after editing the line-edit contents, the return or enter keys
are pressed, jut remove the focus from the QLineEdit and give it to the
parent's widget (eg: the form).
2) when the tab key is pressed, remove the focus from the QLineEdit
widget and give it to the next widget according to the Tab Order
settings
Point n.2 seems standard on QT, while 1 not...after a return/enter event
the focus remain on the widget.
I've try a simple approach like:
--------
connect(edtTitle, SIGNAL(returnPressed(void)),
this, SLOT(edtTitleReturnPressed(void)));
connect(edtTitle, SIGNAL(editingFinished(void)),
this, SLOT(edtTitleEditingFinished(void)));
void xxx::edtTitleReturnPressed(void)
{
qDebug("edtTitleReturnPressed");
setFocus(); // or edtTitle->clearFocus()
}
void xxx::edtTitleEditingFinished(void)
{
qDebug("NfrmShape::edtTitleEditingFinished");
...
}
----------
but this way cause edtTitleEditingFinished to be called twice...
is there a way to change this behaviour ?
thanks,
Paolo
--
To unsubscribe - send a mail to qt-interest-request@xxxxxxxxxxxxx with
"unsubscribe" in the subject or the body.
List archive and information: http://lists.trolltech.com/qt-interest/
|
|