如何去除字符串中的双引号的问题

参考博客:https://blog.csdn.net/u010948547/article/details/49153047

一、基本界面布局如图所示:

二、代码实现槽函数,如下:

//按钮中触发信号
void MainWindow::on_pushButton_clicked()
{
    QString str =ui->lineEdit_2->text();
    QString str1 =str.replace("\"","");
    ui->lineEdit_3->setText(str1);
}

 三、最后实现结果如下:

完成! 

发布了163 篇原创文章 · 获赞 42 · 访问量 3万+

猜你喜欢

转载自blog.csdn.net/Littlehero_121/article/details/103715537
今日推荐