Код: Выделить всё
if(play_file.right(3)=="mp4")
{
QString videoFile = play_file;
if (!videoFile.isEmpty()) {
QDir dir;
player->setMedia(QMediaContent(QUrl::fromLocalFile(dir.absoluteFilePath(videoFile))));
player->play();
}
}
< /code>
Сначала видео не может быть воспроизведено, и консоль сообщила: < /p>
DirectShowPlayerService::doRender: Unresolved error code 0x80040266 (IDispatch error #102)
Код: Выделить всё
Peiran message result is: 0
Подробнее здесь: https://stackoverflow.com/questions/794 ... eo-in-qt-5