hi all,
please tell me how to make concatenate of two different datatypes
Qstring str="4";
unsigned long lg=100001;
now i want to make the value as lg= 4100001 .(i.e.,"4"+100001)
Thanks,
hi all,
please tell me how to make concatenate of two different datatypes
Qstring str="4";
unsigned long lg=100001;
now i want to make the value as lg= 4100001 .(i.e.,"4"+100001)
Thanks,
Have a look at the QString documentation, you can convert unsigned long to QString and then concatenate.
zoz (30th May 2010)
Hi;
try use the class QVariant.
Last edited by Naami; 30th May 2010 at 10:33. Reason: updated contents
zoz (30th May 2010)
Or something like this:
Qt Code:
To copy to clipboard, switch view to plain text mode
zoz (30th May 2010)
Qt Code:
unsigned long lg=100001; qDebug() << str; lg=str.toLong(); qDebug()<< lg;To copy to clipboard, switch view to plain text mode
Voilá
__________________________________________________
My projects: calculator MathGraphica ; SuperEpicMegaHero game ; GooglePlay ; bitbucket ; github
Like my projects ? Buy me a kofi
Bookmarks