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
QtWS25 Last Chance

Convert QString hex to Float

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 3 Posters 2.2k 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 23 Jul 2019, 09:41 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?

    A 1 Reply Last reply 23 Jul 2019, 09:50
    0
    • M Offline
      M Offline
      mrjj
      Lifetime Qt Champion
      wrote on 23 Jul 2019, 09:45 last edited by
      #2

      Hi
      Did you try
      QString::toDouble() ?

      B 1 Reply Last reply 23 Jul 2019, 09:46
      0
      • M mrjj
        23 Jul 2019, 09:45

        Hi
        Did you try
        QString::toDouble() ?

        B Offline
        B Offline
        Babs
        wrote on 23 Jul 2019, 09:46 last edited by
        #3

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

        1 Reply Last reply
        0
        • B Babs
          23 Jul 2019, 09:41

          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?

          A Offline
          A Offline
          aha_1980
          Lifetime Qt Champion
          wrote on 23 Jul 2019, 09:50 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
          • M Offline
            M Offline
            mrjj
            Lifetime Qt Champion
            wrote on 23 Jul 2019, 10:01 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 23 Jul 2019, 10:05
            0
            • M mrjj
              23 Jul 2019, 10:01

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

              B Offline
              B Offline
              Babs
              wrote on 23 Jul 2019, 10:05 last edited by
              #6

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

              A 1 Reply Last reply 23 Jul 2019, 10:14
              3
              • B Babs
                23 Jul 2019, 10:05

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

                A Offline
                A Offline
                aha_1980
                Lifetime Qt Champion
                wrote on 23 Jul 2019, 10:14 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

                4/7

                23 Jul 2019, 09:50

                • Login

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