Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. A subclass of QPlainTextEdit with two fonts for two scripts?
Forum Updated to NodeBB v4.3 + New Features

A subclass of QPlainTextEdit with two fonts for two scripts?

Scheduled Pinned Locked Moved General and Desktop
5 Posts 2 Posters 2.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.
  • S Offline
    S Offline
    soroush
    wrote on last edited by
    #1

    Hi there,

    I'm interested in some kind of plain text editor with this specification: For each character 'c' if c a is a Persian or Arabic letter (its code is in a certain unicode range) then set its font to F else set its font to G. (Obviously reimplementing key-press will not help.) Also, the user should be able to change F and G.

    1 Reply Last reply
    0
    • S Offline
      S Offline
      soroush
      wrote on last edited by
      #2

      anything?

      1 Reply Last reply
      0
      • S Offline
        S Offline
        SimonL
        wrote on last edited by
        #3

        You could probably use QTextEdit but then you would need to specify your different fonts in html tags
        I believe your main limitation in QPlainTextEdit will be its restriction to having 1 font at a time.

        1 Reply Last reply
        0
        • S Offline
          S Offline
          soroush
          wrote on last edited by
          #4

          Ok, I don't care about using QPlainTextEdit or QTextEdit... how could I do this with QTextEdit efficiently ?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            SimonL
            wrote on last edited by
            #5

            I haven't played with this object much yet but you should be able to use the cursor to determine new user input

            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