Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. TextField placeHolder alignment when text align is center

TextField placeHolder alignment when text align is center

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
3 Posts 2 Posters 916 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mohammad Sherafat
    wrote on last edited by
    #1

    Hi,
    Screen Shot 2023-05-20 at 3.36.48 PM.png

    I have problem with placeHolder alignment when text horizontalAlignemnt is when Qt.AlignHCenter.

    What's the problem?

    B 1 Reply Last reply
    0
    • M Mohammad Sherafat

      Hi,
      Screen Shot 2023-05-20 at 3.36.48 PM.png

      I have problem with placeHolder alignment when text horizontalAlignemnt is when Qt.AlignHCenter.

      What's the problem?

      B Offline
      B Offline
      Bob64
      wrote on last edited by
      #2

      @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.

      M 1 Reply Last reply
      0
      • B Bob64

        @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.

        M Offline
        M Offline
        Mohammad Sherafat
        wrote on last edited by
        #3

        @Bob64

        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
                }
            }
        
        
        }
        

        Screen Shot 2023-05-28 at 5.34.47 PM.png
        Screen Shot 2023-05-28 at 5.34.38 PM.png
        Screen Shot 2023-05-28 at 5.34.43 PM.png

        1 Reply Last reply
        0

        • Login

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved