Convert Hex to Double to Hex?
问题 In my project I have a QString with the hex value (Big Endian) QString hex_in("413DF3EBA463B0"); How could I convert hex_in to a rounded double? IEEE 754 (https://en.wikipedia.org/wiki/Double_precision_floating-point_format) 34.5 The user will edit the double and then my program needs to convert it back to hex. Thanks for your time :) 回答1: There is really only one way to do it, and that is to convert the string to an integer, put it in a union where you set an integer member and read out a