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. [SOLVED] TextInput & TextEdit mess up the text rendering when text is entered
Forum Updated to NodeBB v4.3 + New Features

[SOLVED] TextInput & TextEdit mess up the text rendering when text is entered

Scheduled Pinned Locked Moved QML and Qt Quick
4 Posts 3 Posters 1.6k Views 1 Watching
  • 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.
  • D Offline
    D Offline
    DerMas
    wrote on last edited by
    #1

    I have a strange problem with the TextInput and TextEdit components:

    When I write letters that are not already displayed by my QML application, it will mess up the rendering of text in the entire application.

    Here is an example for a better understanding:

    There is a Text saying "Hello World" and a TextInput with the text "Edit". As you can see everything is fine.

    !http://i.imgur.com/BPLTYDy.png(pic1)!

    But after typing a letter in the TextInput, that is not already somewhere in the app (in this example after typing the "a"), the Text with "HelloWord" is messed up. Some letters are missing or in other cases are replaced by broken characters. Even the TextInput letters are messed up if I write further on.

    !http://i.imgur.com/ZLVIaIv.png(pic2)!
    Other text:
    !http://i.imgur.com/VKICkyv.png(pic3)!

    And here is the sample code:
    @
    import QtQuick 2.0

    Rectangle {
    width: 250
    height: 150

    Text {
        text: qsTr("Hello World")
    }
    
    TextInput{
        text: qsTr("Edit")
        anchors.centerIn: parent
    }
    

    }
    @

    I compile everything with MinGW on Windows 8 Pro 32 bit (german). I use QT 5.1 with QT Creator 2.7.2.
    So are there any ideas what is going wrong?

    1 Reply Last reply
    0
    • L Offline
      L Offline
      laurent bauer
      wrote on last edited by
      #2

      Hello

      Have you tried "renderType: Text.NativeRendering" ?
      @
      TextInput{
      text: qsTr("Edit")
      anchors.centerIn: parent
      renderType: Text.NativeRendering
      }
      @

      1 Reply Last reply
      0
      • D Offline
        D Offline
        DerMas
        wrote on last edited by
        #3

        Hi,

        thanks that works perfectly =)

        Is there some kind of "use this renderype appwide" option, so that you dont have to use this line for every input field you have in your app?

        1 Reply Last reply
        0
        • A Offline
          A Offline
          atif1996
          wrote on last edited by
          #4

          Anyone find a way to set NativeRendering App wide?

          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