TextField placeHolder alignment when text align is center
Unsolved
QML and Qt Quick
-
Hi,
I have problem with placeHolder alignment when text horizontalAlignemnt is when Qt.AlignHCenter.
What's the problem?
-
@Mohammad-Sherafat That looks horizontally aligned to me. Why do you think there is a problem?
Also, if you can explain what you see the problem to be, you will probably need to show some code in order for anyone to help.
-
import QtQuick import QtQuick.Window import QtQuick.Controls import QtQuick.Layouts import QtQuick.Controls.Material 2.15 ApplicationWindow { width: 600 height: 480 visible: true title: qsTr("App Links Test") Material.theme: Material.Dark ColumnLayout { anchors.centerIn: parent width: 500 TextField { placeholderText: "Defult horizontalAlignment" Layout.fillWidth: true } TextField { placeholderText: "horizontalAlignment: Qt.AlignHCenter" Layout.fillWidth: true horizontalAlignment: Qt.AlignHCenter } TextField { placeholderText: "horizontalAlignment: Qt.AlignLeft" Layout.fillWidth: true horizontalAlignment: Qt.AlignLeft } TextField { placeholderText: "horizontalAlignment: Qt.AlignRight" Layout.fillWidth: true horizontalAlignment: Qt.AlignRight } } }