[Qt-qml] how to set text vertical center alignment
Miao, Qiankun
qiankun.miao at intel.com
Fri Jun 17 07:59:04 CEST 2011
Hi
I saw in qml doc that TextInput does not have vertical alignment. But I need this feature. I want to select text by mouse above and below text other than selecting by moving mouse in the text .
For example I can select the text "Hello, world" in the blank area under the text in the following code. But no space above the text. If TextInput could be vertical center alignment, no such issue.
Any comments are appreciated.
import Qt 4.7
Rectangle {
id: rectangle
width: 600
height: 400
TextInput {
id: textinput
anchors.fill: parent
horizontalAlignment: TextInput.AlignHCenter
text: "Hello, World!"
cursorVisible: true
selectByMouse: true
}
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt.nokia.com/pipermail/qt-qml/attachments/20110617/debbfaed/attachment-0002.html
More information about the Qt-qml
mailing list