mirror of
https://github.com/qelectrotech/qelectrotech-source-mirror.git
synced 2025-12-21 00:30:53 +01:00
ElementEditor: decorator: got rid of calls to grabKeyboard()
git-svn-id: svn+ssh://svn.tuxfamily.org/svnroot/qet/qet/trunk@2030 bfdf4180-ca20-0410-9c96-a3a8aa849046
This commit is contained in:
@@ -220,6 +220,20 @@ void PartTextField::focusOutEvent(QFocusEvent *e) {
|
||||
endEdition();
|
||||
}
|
||||
|
||||
/**
|
||||
@reimp QGraphicsTextItem::keyPressEvent()
|
||||
Used to handle the escape key when the event is delivered to the field, not
|
||||
to the decorator.
|
||||
*/
|
||||
void PartTextField::keyPressEvent(QKeyEvent *event) {
|
||||
if (event -> key() == Qt::Key_Escape) {
|
||||
endEdition();
|
||||
}
|
||||
else {
|
||||
QGraphicsTextItem::keyPressEvent(event);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
Permet a l'element texte de devenir editable lorsqu'on double-clique dessus
|
||||
@param e Le QGraphicsSceneMouseEvent qui decrit le double-clic
|
||||
|
||||
Reference in New Issue
Block a user