Details
-
Bug
-
Resolution: Done
-
P3: Somewhat important
-
4.7.2
-
77cba04c244c47c77af04777de3b3172c309b541
Description
Double click on the first letter of any word, left of the letter's vertical center.
This selects the word and the word infront.
import Qt 4.7 Item { width: 600 height: 400 Rectangle { width: 400 height: 40 color: "lightgreen" anchors.centerIn: parent TextInput { id: textInput anchors.fill: parent text: "This is a TextInput text" font.pixelSize: 30 selectByMouse: true MouseArea { anchors.fill: parent onPressed: { print("pressed") textInput.focus = true; textInput.cursorPosition = textInput.positionAt(mouse.x); } onDoubleClicked: { print("double-clicked") textInput.selectWord(textInput.positionAt(mouse.x)); } } } } }