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. How to add subscript text in file created by qfile ?
Forum Updated to NodeBB v4.3 + New Features

How to add subscript text in file created by qfile ?

Scheduled Pinned Locked Moved Solved General and Desktop
5 Posts 4 Posters 386 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.
  • Q Offline
    Q Offline
    Qt embedded developer
    wrote on 22 Nov 2022, 12:49 last edited by
    #1

    i want to write co2 proper way in file created by qfile.

    how we can write it ?

    because i have seen it that it not get properly come when write into file using QTextStream and out.

    J J M 3 Replies Last reply 22 Nov 2022, 13:59
    0
    • Q Qt embedded developer
      22 Nov 2022, 12:49

      i want to write co2 proper way in file created by qfile.

      how we can write it ?

      because i have seen it that it not get properly come when write into file using QTextStream and out.

      M Offline
      M Offline
      mpergand
      wrote on 22 Nov 2022, 14:27 last edited by
      #4

      @Qt-embedded-developer

      Try with unicode value :
      QString t="co\u2082"; ----> "co₂"

      Q 1 Reply Last reply 23 Nov 2022, 05:53
      4
      • Q Qt embedded developer
        22 Nov 2022, 12:49

        i want to write co2 proper way in file created by qfile.

        how we can write it ?

        because i have seen it that it not get properly come when write into file using QTextStream and out.

        J Offline
        J Offline
        jsulm
        Lifetime Qt Champion
        wrote on 22 Nov 2022, 13:59 last edited by
        #2
        This post is deleted!
        1 Reply Last reply
        0
        • Q Qt embedded developer
          22 Nov 2022, 12:49

          i want to write co2 proper way in file created by qfile.

          how we can write it ?

          because i have seen it that it not get properly come when write into file using QTextStream and out.

          J Offline
          J Offline
          JonB
          wrote on 22 Nov 2022, 14:11 last edited by
          #3

          @Qt-embedded-developer
          This is not a "feature" of QFile or QTextStream. You will presumably need one of:

          • Is there a font which offers to write a small, subscripted 2 character among its characters? I doubt it, but maybe....

          • Sounds like you would want a rich text/HTML file instead of a text one, they support some kind of "subscript", don't know whether that is recognized in Qt "subset", quite possibly not....

          1 Reply Last reply
          0
          • Q Qt embedded developer
            22 Nov 2022, 12:49

            i want to write co2 proper way in file created by qfile.

            how we can write it ?

            because i have seen it that it not get properly come when write into file using QTextStream and out.

            M Offline
            M Offline
            mpergand
            wrote on 22 Nov 2022, 14:27 last edited by
            #4

            @Qt-embedded-developer

            Try with unicode value :
            QString t="co\u2082"; ----> "co₂"

            Q 1 Reply Last reply 23 Nov 2022, 05:53
            4
            • M mpergand
              22 Nov 2022, 14:27

              @Qt-embedded-developer

              Try with unicode value :
              QString t="co\u2082"; ----> "co₂"

              Q Offline
              Q Offline
              Qt embedded developer
              wrote on 23 Nov 2022, 05:53 last edited by
              #5
              This post is deleted!
              1 Reply Last reply
              0

              1/5

              22 Nov 2022, 12:49

              • Login

              • Login or register to search.
              1 out of 5
              • First post
                1/5
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved