<QtC++>选择文件\选择文件夹\label播放gif
void MainWindow::selectfile()//选择文件(gif)
{
path = QFileDialog::getOpenFileName(this,tr("Open File"),".",tr("Text Files(*.gif)"));
ui->lineEdit->setText(path);
}
void MainWindow::selectfile_2()//选择文件夹
{
path=QFileDialog::getExistingDirectory (this);
ui->lineEdit_2->setText(path);
}
void MainWindow::on_pushButton_clicked()//label播放gif
{
movie = new QMovie("path");
ui->label->setMovie(movie);
movie->setFileName(path);
movie->start();
qDebug()<
网站题目:<QtC++>选择文件\选择文件夹\label播放gif
链接分享:http://myzitong.com/article/ppdgse.html