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. TextEdit: modifying selection format (weight, color..)
Forum Updated to NodeBB v4.3 + New Features

TextEdit: modifying selection format (weight, color..)

Scheduled Pinned Locked Moved QML and Qt Quick
5 Posts 3 Posters 3.7k 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.
  • B Offline
    B Offline
    brouits
    wrote on last edited by
    #1

    Hello,

    Maybe didn't i understand how to use TextEdit's methods but i can't figure out how to modify the format of a simple selection. I was stuck on 3 issues:

    • setting properties affect the whole document
    • using selectedText returns a simple string (not a Text) that is not formatable
    • selectionStart and selectionEnd returns indexes on formatted text, not raw data so that we can't manipulate the raw data to change selection's format.

    After my investigation, i wonder if there is currently a way to change a selection's format. Tips would be very welcomed!

    1 Reply Last reply
    0
    • M Offline
      M Offline
      mbrasser
      wrote on last edited by
      #2

      You are correct, there isn't currently a way to format a selection (or in general to do real rich text editing) with TextEdit. It's definitely something that should be addressed though -- could you please add a suggestion to the "bug tracker":http://bugreports.qt.nokia.com?

      1 Reply Last reply
      0
      • B Offline
        B Offline
        brouits
        wrote on last edited by
        #3

        Thank you for your reply.

        The bug/suggestion key is QTCOMPONENTS-155

        I hope i didn't post to the wrong place.

        1 Reply Last reply
        0
        • T Offline
          T Offline
          tobias.hunger
          wrote on last edited by
          #4

          Here is the link to "QTCOMPONENTS-155":http://bugreports.qt.nokia.com/browse/QTCOMPONENTS-155.

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbrasser
            wrote on last edited by
            #5

            TextEdit is one of the core QML elements, so I've moved this to "QTBUG-13575":http://bugreports.qt.nokia.com/browse/QTBUG-13575. Thanks for filing the report!

            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