-
Bug
-
Resolution: Done
-
P1: Critical
-
5.3.0 Beta1
-
None
-
Mac OSX 10.8
iPhone 5 (iOS 7)
-
qtdeclarative#release: 8da17239ed4a68270c74f6a5e5ca04d82d99b547
The following code worked on this mac in 5.2.1 and iOS. It works on iOS in 5.3 but will not receive text input on the mac. If I comment out event.accepted=true the textField receives keyboard input again properly
Rectangle {
id: root
anchors.fill: parent
color: "#AA000000"
Rectangle {
id: contentHolder
anchors.top: parent.top
anchors.left: parent.left
height: parent.height
width: parent.width
color: "transparent"
Rectangle {
id: content
property real spacing: 6
property real outerSpacing: 12
property real buttonsRowImplicitWidth: Screen.pixelDensity * 50
height: childrenRect.height
width: Screen.primaryOrientation==Qt.PortraitOrientation?root.width * 0.8 : root.width * 0.5
// color: backgroundColor
// focus: root.visible
anchors.centerIn: parent
Keys.onPressed: {
event.accepted = true
if (event.modifiers === Qt.ControlModifier)
switch (event.key) {
case Qt.Key_A:
textInputControl.selectAll()
break
case Qt.Key_C:
textInputControl.copy()
break
} else switch (event.key) {
case Qt.Key_Escape:
case Qt.Key_Back:
button2Clicked()
break
case Qt.Key_Enter:
case Qt.Key_Return:
button1Clicked()
break
}
}
TextField {
id: textInputControl
anchors {
left: parent.left
right: parent.right
top:parent.top
// margins: content.outerSpacing
}
//work around for bug https://bugreports.qt-project.org/browse/QTBUG-35689
inputMethodHints: Qt.ImhNoPredictiveText
}
}
}
}