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 cursor not updated after font size change
Forum Updated to NodeBB v4.3 + New Features

TextArea cursor not updated after font size change

Scheduled Pinned Locked Moved Unsolved QML and Qt Quick
1 Posts 1 Posters 173 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
    maydin
    wrote on last edited by maydin
    #1

    https://doc.qt.io/qt-5/qtquickcontrols-texteditor-example.html

    When you change font size in document cursor is not updated until you click TextArea.

    You can produce without typing any code as this: choose a text, open font dialog, increase font size to a big value then use Tab scroll until TextArea gets focus.

    Or just add a button and change fontSize on click like this: document.fontSize = 36

    https://doc.qt.io/qt-5/qquicktextdocument.html
    Maybe related to this because of this warning:
    Warning: The QTextDocument provided is used internally by Qt Quick elements to provide text manipulation primitives. You are not allowed to perform any modification of the internal state of the QTextDocument. If you do, the element in question may stop functioning or crash.

    39fb5102-62b2-4b36-8d28-53e7eff03224-image.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