canUndo
-
wrote on 4 Apr 2015, 05:24 last edited by p3c0 4 Apr 2015, 05:25
TextInput { id: inpuT canUndo :true x: 232 y: 29 width: 952 height: 71 font.pixelSize: 12 }
There's a problem with canUndo, here's an error: "Invalid property assignment: "canUndo" is a read-only property". I don't get it there's written that canUndo is bool function am I doing anything wrong?
Edited: Use ``` (3 backticks) to use code blocks - p3c0
-
TextInput { id: inpuT canUndo :true x: 232 y: 29 width: 952 height: 71 font.pixelSize: 12 }
There's a problem with canUndo, here's an error: "Invalid property assignment: "canUndo" is a read-only property". I don't get it there's written that canUndo is bool function am I doing anything wrong?
Edited: Use ``` (3 backticks) to use code blocks - p3c0
@Zubalama It is readonly property. If you want to perform undo operations just do
ctrl-z
and for redoctrl-shift-z
(on Linux). -
@Zubalama It is readonly property. If you want to perform undo operations just do
ctrl-z
and for redoctrl-shift-z
(on Linux). -
wrote on 4 Apr 2015, 07:51 last edited by
thanks but how do you use undo? like "inpuT.text.undo()" like this?
-
@Zubalama Since it is a
TextInput
's function, simplyinpuT.undo()
will do. -
wrote on 4 Apr 2015, 08:22 last edited by p3c0 4 Apr 2015, 08:44
well I want to create undo button but it doesn't work... hows that?
Keys.onPressed: { if(event.key===Qt.Key_Space){ event.accepted=true inpuT.undo() }
-
well I want to create undo button but it doesn't work... hows that?
Keys.onPressed: { if(event.key===Qt.Key_Space){ event.accepted=true inpuT.undo() }
@Zubalama Why don't you just use a Button instead ?
Button { text: "Undo" onClicked: inpuT.undo() }
3/7