Hello All,
In my code I have to convert a decimal number into binary by using some QT inbuilt function.
I am having a decimal in array like below
unsigned int Data_ecu2uss[12];
Data_ecu2uss[0] = 68159
Data_ecu2uss[1] = 3554148352
....
...
Data_ecu2uss[12] = 3554148395
unsigned int Data_ecu2uss[12];
Data_ecu2uss[0] = 68159
Data_ecu2uss[1] = 3554148352
....
...
Data_ecu2uss[12] = 3554148395
To copy to clipboard, switch view to plain text mode
I am trying to convert like below but getting always ival as 0
int ival = Hexnumber.toInt(0,2);
qDebug()<<"ival"<<ival;
ui
->le_ecu2uss_data1
->setText
(QString::number(ival,
2));
QString Hexnumber = QString::number(Data_ecu2uss[0],16);
int ival = Hexnumber.toInt(0,2);
qDebug()<<"ival"<<ival;
ui->le_ecu2uss_data1->setText(QString::number(ival,2));
To copy to clipboard, switch view to plain text mode
Bookmarks