title: How to check the auto alignment of text when Text contains Arabic words
body: <p>I have created a Rectangle item with Text item in center which acts as Edit box with Cursor item at the end of the text.</p>
  
  <p><a href="https://i.stack.imgur.com/fiHng.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fiHng.png" alt="SAMPLE iMAGE "></a></p>
  
  <p>So for Orientation to be taken care by QML, I have modified the Text item as </p>
  
  <pre><code>Text
      {
          id: text_input
          font.bold: true
          font.pixelSize: 22
          color: "white"
          text:  view.defaultTextField
          elide: Text.ElideLeft
          verticalAlignment: Text.AlignVCenter
          anchors.fill: parent
          maximumLineCount: 1
  
          clip: true
  
          anchors{
              rightMargin: 10
              leftMargin: (textInputField === "") ? 18 : 12
              verticalCenter: parent.verticalCenter
          }
      }
  </code></pre>
  
  <p>and Cursor image as</p>
  
  <pre><code>Image
      {
          id: img_cursor
  
          x: (textInputField !== "") ?
                (text_input.x + text_input.contentWidth)) : 12
  
          anchors.verticalCenter: parent.verticalCenter
          source: "text_cursor.png"
      }
  </code></pre>
  
  <p>Now if textInputField contains Arabic text, TextItem is auto change the orientation from right to left. and english it is changing to start from Left.
  Text appending coming in :
  Arabic: Left &lt;--Right<br>
  English: Left --> Right</p>
  
  <p>But for Cursor position, how i can make the logic to auto detect and change the x position of the cursor based on the text_input orientation direction (Arabic and English).</p>