Conversion to QString from int or byte return wrong val...
Code:
textedit
->insertPlainText
(QString.
setNum(intArray
[i
]));
or
Code:
textedit
->insertPlainText
(QString.
number(intArray
[i
]));
same with byte array do great work but in case int = 200 i.e.
it print -56 :mad:
what is wrong with me?????????????
Re: Conversion to QString from int or byte return wrong val...
This should not even compile if it is supposed to be C++... ?!
Try:
Code:
textedit->insertPlainText(strNum.setNum(intArray[i]));
But before you go further I strongly suggest you first learn the C/C++ syntax.
Re: Conversion to QString from int or byte return wrong val...
yy thank you for sugalksdjal;ksjd;lkjasdf
about setNum true, but in case I've compiled that func, i guess compiller worn about it, or not?
any way i used char array not int... my example work fine,.
Thanks for your help...
Re: Conversion to QString from int or byte return wrong val...
Quote:
Originally Posted by
FalloutST
any way i used char array not int... my example work fine.
char is a signed type with int range <-127,127> not <0,255>.