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. Convert QString hex to Float
Forum Update on Monday, May 27th 2025

Convert QString hex to Float

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 2.3k 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.
  • B Offline
    B Offline
    Babs
    wrote on last edited by
    #1

    Hello is there any function that can convert QString hex to Float directly. If it isn't can you help with tips to do it fast?

    aha_1980A 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      Did you try
      QString::toDouble() ?

      B 1 Reply Last reply
      0
      • mrjjM mrjj

        Hi
        Did you try
        QString::toDouble() ?

        B Offline
        B Offline
        Babs
        wrote on last edited by
        #3

        @mrjj it doesn't support Hexadecimal conversion to float.

        1 Reply Last reply
        0
        • B Babs

          Hello is there any function that can convert QString hex to Float directly. If it isn't can you help with tips to do it fast?

          aha_1980A Offline
          aha_1980A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on last edited by
          #4

          @Babs Please clarify "QString hex". Best would be to give an example of your input data and what you expect to get out of it.

          Regards

          Qt has to stay free or it will die.

          1 Reply Last reply
          1
          • mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            Hi
            Also this might be interesting
            https://forum.qt.io/topic/98725/convert-hex-to-double

            B 1 Reply Last reply
            0
            • mrjjM mrjj

              Hi
              Also this might be interesting
              https://forum.qt.io/topic/98725/convert-hex-to-double

              B Offline
              B Offline
              Babs
              wrote on last edited by
              #6

              Thanks you all . I found the solution from @aha_1980 github
              https://github.com/andre-hartmann/IEEE754

              aha_1980A 1 Reply Last reply
              3
              • B Babs

                Thanks you all . I found the solution from @aha_1980 github
                https://github.com/andre-hartmann/IEEE754

                aha_1980A Offline
                aha_1980A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Babs So please mark this topic as SOLVED then. Thanks!

                Qt has to stay free or it will die.

                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