QFileDialog对话框中如何获取选中的路径的名
voidGoToCellDialog::on_pushButton_clicked(){QFileDialog*openFilePath=newQFileDialog(t...
void GoToCellDialog::on_pushButton_clicked()
{
QFileDialog* openFilePath = new QFileDialog( this, " choose loadfilepath", "file");
//openFilePath-> setFileMode( QFileDialog::DirectoryOnly );//choose existingfile
openFilePath-> setFileMode( QFileDialog::AnyFile );//choose any file
QString filename;
if ( openFilePath->exec() == QDialog::Accepted )
{
//这里怎么获取选中路径的路径名???
} 展开
{
QFileDialog* openFilePath = new QFileDialog( this, " choose loadfilepath", "file");
//openFilePath-> setFileMode( QFileDialog::DirectoryOnly );//choose existingfile
openFilePath-> setFileMode( QFileDialog::AnyFile );//choose any file
QString filename;
if ( openFilePath->exec() == QDialog::Accepted )
{
//这里怎么获取选中路径的路径名???
} 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询