This is what I want:
---------------------------------------------------
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
// cpp
void myapp01r::myappstr()
{
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 += char(chValue);
}
ui->lineEdit_2->setText(pass3);
}
void myapp01r::myappstr()
{
QString pass3;
QChar ch,ch2;
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 += char(chValue);
}
ui->lineEdit_2->setText(pass3);
}
To copy to clipboard, switch view to plain text mode
header
private slots:
void myappstr();
private slots:
void myappstr();
To copy to clipboard, switch view to plain text mode
Bookmarks