I am tring to shift enter chararter by 2 . That mean char "A" to "c".
How it should work:
1> I collect QString from LineEdit.
2>Than get each ASCII value of SQtring
3> Add 2 to ASCII Value
4> Convert it to QString
5> Show it to Thru LineEdit2
int i,chValue;
// Get Data
QString str
= ui
->lineEdit
->text
();
// QString to char array;
for(i=0; i<=str.size();i++)
{
// converted to number
ch=str.at(i).toAscii();
chValue = ch.toAscii();
chValue=chValue + 2;
// Number to Charecter and string in QSTRING
}
ui->lineEdit_2->setText(pass3);
QString pass3;
QChar ch;
int i,chValue;
// Get Data
QString str = ui->lineEdit->text();
// QString to char array;
for(i=0; i<=str.size();i++)
{
// converted to number
ch=str.at(i).toAscii();
chValue = ch.toAscii();
chValue=chValue + 2;
// Number to Charecter and string in QSTRING
pass3 += QChar(chVale);
}
ui->lineEdit_2->setText(pass3);
To copy to clipboard, switch view to plain text mode
Bookmarks