void Form_OVAL::on_zimu_btn_clicked()
{
QString input_string= ui -> zimu_Edit -> toPlainText();
int random;
for (int i=0;i<input_string.length();i++) {
random=input_string.at(i).toLatin1();
}
ui->shuzhi_Edit_2->setText(QString::number(random));
}
请大家帮我看下,输出的值只把最后一个值转了,前面的都被覆盖了。就像上图这样只显示了100,本应该abcd转为ascii码应输出979899100