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"
|
text: "Copy"
|
||||||
enabled: myTextEdit.selectedText !== ""
|
enabled: myTextEdit.selectedText !== ""
|
||||||
onTriggered: myTextEdit.copy()
|
onTriggered: myTextEdit.copy()
|
||||||
shortcut: StandardKey.Copy
|
/* shortcut: StandardKey.Copy Shortcuts in QQC2 seem to override global shortcuts */
|
||||||
}
|
}
|
||||||
Controls2.Action {
|
Controls2.Action {
|
||||||
text: "Cut"
|
text: "Cut"
|
||||||
enabled: myTextEdit.selectedText !== "" && !myTextEdit.readOnly
|
enabled: myTextEdit.selectedText !== "" && !myTextEdit.readOnly
|
||||||
onTriggered: myTextEdit.cut()
|
onTriggered: myTextEdit.cut()
|
||||||
shortcut: StandardKey.Cut
|
/* shortcut: StandardKey.Cut Shortcuts in QQC2 seem to override global shortcuts */
|
||||||
}
|
}
|
||||||
Controls2.Action {
|
Controls2.Action {
|
||||||
text: "Paste"
|
text: "Paste"
|
||||||
enabled: myTextEdit.canPaste
|
enabled: myTextEdit.canPaste
|
||||||
onTriggered: myTextEdit.paste()
|
onTriggered: myTextEdit.paste()
|
||||||
shortcut: StandardKey.Paste
|
/* shortcut: StandardKey.Paste Shortcuts in QQC2 seem to override global shortcuts */
|
||||||
}
|
}
|
||||||
Controls2.Action {
|
Controls2.Action {
|
||||||
text: "Delete"
|
text: "Delete"
|
||||||
enabled: myTextEdit.selectedText !== ""
|
enabled: myTextEdit.selectedText !== ""
|
||||||
onTriggered: myTextEdit.remove(myTextEdit.selectionStart,
|
onTriggered: myTextEdit.remove(myTextEdit.selectionStart,
|
||||||
myTextEdit.selectionEnd)
|
myTextEdit.selectionEnd)
|
||||||
shortcut: StandardKey.Delete
|
/* shortcut: StandardKey.Delete Shortcuts in QQC2 seem to override global shortcuts */
|
||||||
}
|
}
|
||||||
Controls2.Action {
|
Controls2.Action {
|
||||||
text: "Clear"
|
text: "Clear"
|
||||||
enabled: myTextEdit.text !== ""
|
enabled: myTextEdit.text !== ""
|
||||||
onTriggered: myTextEdit.clear()
|
onTriggered: myTextEdit.clear()
|
||||||
shortcut: StandardKey.DeleteCompleteLine
|
/* shortcut: StandardKey.DeleteCompleteLine Shortcuts in QQC2 seem to override global shortcuts */
|
||||||
}
|
}
|
||||||
|
|
||||||
MenuSeparator {
|
MenuSeparator {
|
||||||
|
Reference in New Issue
Block a user