QStringstrNum=QString::number(12);
qDebug()<<"test="<<strNum;

intnum=strNum.toInt();
qDebug()<<"test2="<<num;

打印出如下:

test = "12"

test2 = 12 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
  • 2021-12-25
猜你喜欢
  • 2021-04-16
  • 2022-12-23
  • 2021-05-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案