forked from qt-creator/qt-creator
QmlDesigner: Fix delete shortcut
QtQuick Controls 2 seem to define all shortcuts globally. Task-number: QDS-803 Change-Id: I6d29f659261c12bdd66473e2c680044b486891ec Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
This commit is contained in:
@@ -51,32 +51,32 @@ Menu {
|
||||
text: "Copy"
|
||||
enabled: myTextEdit.selectedText !== ""
|
||||
onTriggered: myTextEdit.copy()
|
||||
shortcut: StandardKey.Copy
|
||||
/* shortcut: StandardKey.Copy Shortcuts in QQC2 seem to override global shortcuts */
|
||||
}
|
||||
Controls2.Action {
|
||||
text: "Cut"
|
||||
enabled: myTextEdit.selectedText !== "" && !myTextEdit.readOnly
|
||||
onTriggered: myTextEdit.cut()
|
||||
shortcut: StandardKey.Cut
|
||||
/* shortcut: StandardKey.Cut Shortcuts in QQC2 seem to override global shortcuts */
|
||||
}
|
||||
Controls2.Action {
|
||||
text: "Paste"
|
||||
enabled: myTextEdit.canPaste
|
||||
onTriggered: myTextEdit.paste()
|
||||
shortcut: StandardKey.Paste
|
||||
/* shortcut: StandardKey.Paste Shortcuts in QQC2 seem to override global shortcuts */
|
||||
}
|
||||
Controls2.Action {
|
||||
text: "Delete"
|
||||
enabled: myTextEdit.selectedText !== ""
|
||||
onTriggered: myTextEdit.remove(myTextEdit.selectionStart,
|
||||
myTextEdit.selectionEnd)
|
||||
shortcut: StandardKey.Delete
|
||||
/* shortcut: StandardKey.Delete Shortcuts in QQC2 seem to override global shortcuts */
|
||||
}
|
||||
Controls2.Action {
|
||||
text: "Clear"
|
||||
enabled: myTextEdit.text !== ""
|
||||
onTriggered: myTextEdit.clear()
|
||||
shortcut: StandardKey.DeleteCompleteLine
|
||||
/* shortcut: StandardKey.DeleteCompleteLine Shortcuts in QQC2 seem to override global shortcuts */
|
||||
}
|
||||
|
||||
MenuSeparator {
|
||||
|
Reference in New Issue
Block a user