Display hexdecima format
-
Hi @taku-s,
just to add an example to @ChrisW67's good hints:
lineEdit_2->setText(lineEdit1->text().toLocal8Bit().toHex(' '));
Note: if your text only contains ASCII characters, you can replace
toLocal8Bit()
withtoLatin1()
. If not, you should also check iftoUtf8()
might be the better solution, but keep in mind that one character inlineEdit_1
might result in several characters inlineEdit_2
then.Regards
-
Hi @taku-s,
just to add an example to @ChrisW67's good hints:
lineEdit_2->setText(lineEdit1->text().toLocal8Bit().toHex(' '));
Note: if your text only contains ASCII characters, you can replace
toLocal8Bit()
withtoLatin1()
. If not, you should also check iftoUtf8()
might be the better solution, but keep in mind that one character inlineEdit_1
might result in several characters inlineEdit_2
then.Regards
-
@taku-s said in Display hexdecima format:
I was able to solve
great, so please don't forget to mark your post as solved!