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. TextArea with QtRendering? [solved]
Forum Updated to NodeBB v4.3 + New Features

TextArea with QtRendering? [solved]

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
2 Posts 1 Posters 617 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.
  • David.GD Offline
    David.GD Offline
    David.G
    wrote on last edited by David.G
    #1

    Not sure if it's the intended effect. As I was working in my app noticed that while Text type remained pretty smooth the TextArea type would fallback to native rendering (apparently) so I'm not sure if it's working as intended or if there's a way to turn Qt's way of font rendering.

    Difference

    http://i.imgur.com/rhardl0.png

    Any suggestion is welcome, the final result is that I want the user to be able to select the text, highlight it, etc etc. The issue, while trivial, I just hope that it's just an isolated issue, and that TextArea will look fine in android/osx

    1 Reply Last reply
    0
    • David.GD Offline
      David.GD Offline
      David.G
      wrote on last edited by
      #2

      To answer my own question (had more or less an idea on how to solve it just needed to put it in practice).

      The right way to do it is just styling TextArea. Please refer to http://doc.qt.io/qt-5/qml-qtquick-controls-styles-textareastyle.html

      The dirty way and not so recommended way as the inners of TextArea could change :

      // Suppose we have a textarea
      TextArea {
      id: mytextarea
      
      Component.onCompleted: {
      
      mytextarea.__style.renderType = Text.QtRendering;
      }
      }
      
      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