Qt 利用按键(pushbutton)打开文件对话框
1 void MainWindow::on_OpenFile_clicked() 2 { 3 QString FileName = QFileDialog::getOpenFileName(this,tr("文件对话框"),"C:",tr("数据流文件(*lmds)")); 4 qDebug()<<"filename : "<<FileName; 5 }