Details
-
Bug
-
Resolution: Invalid
-
Not Evaluated
-
None
-
5.12.5
-
None
-
Android 5-9, Linux Ubuntu 17.10
Description
I've encountered this issue on Androic systems across versions 5-9 and reproduced in linux as Desktop qt.
Placeholder text seems to be correctly aligned vertically, inputted text, however isn't.
Setting `verticalAlignment` property does not have any effect on typed text.
Minimal example: (Ubuntu 17.10)
import QtQuick 2.12import QtQuick.Window 2.12import QtQuick.Controls 2.4
import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.4 Window { visible: true width: 640 height: 480 title: qsTr("Hello World") TextField { height: 20 width: 200 placeholderText: "Test text" background: Rectangle { radius: 3 color: "gray" } } }
placeholder text:
when the text is inputted (it is raised and clipped at the top)
Note that this issue only occurs when the height of the TextField is exactly or slightly larger than the height of the text font. It seems to me that there is a inner padding that has an effect of raising the text and clipping it at the top.
By setting the textField's height above 28 in my example, made the TextField tall enough so the issue is masked.
Let me know if more info is needed.
Attachments
Issue Links
- is duplicated by
-
QTBUG-81679 Wrong positioning text in the TextField control
- Open