//QFileDialog::getOpenFileName返回的是路径名字符串
connect(ui->pushButton,&QPushButton::clicked,this,[=](){
QString path=QFileDialog::getOpenFileName(this,"打开文件","C:/Users/BPLFMF3/Desktop");
//将路径放入lineedit中
ui->lineEdit-
QT-QFile读写文件操作示例
最新推荐文章于 2024-07-06 11:24:26 发布
![](https://img-home.csdnimg.cn/images/20240711042549.png)