View Full Version : is there a way to show Hexadecimal number???
cL4r4
22nd August 2008, 05:49
hi
this is wht i m doing...the data inside is actually a hexadecimal and it give me the int number when i compile...i jux want it to display as hex eg: 0x32
info3->setText(QString("%1").arg(rec_table.data[2].status));
is there a way to do that???
thx so much in advance :)
Ginsengelf
22nd August 2008, 06:54
Hi,
use
http://doc.trolltech.com/4.3/qstring.html#arg-10 and set base to 16.
Ginsengelf
john_god
22nd August 2008, 07:20
try %x or %X
jacek
22nd August 2008, 08:46
Please don't post the same question more than once.
wysota
22nd August 2008, 10:08
the data inside is actually a hexadecimal and it give me the int number when i compile...
I would only like to notice that a number is a number - not hexadecimal, not decimal but a number and its internal representation is binary not hexadecimal by the way, so you can't have a "hexadecimal number" - you just have an int and if you want to show it to someone you'll be converting it to a textual representation and the latter can show your number in hexadecimal, decimal, octal, binary or whatever else form you might think of.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.