Please nominate your Qt Champions for 2021! https://forum.qt.io/topic/132134/looking-for-the-2021-qt-champions

Can't access QMediaMetaData::Size



  • Hey, I am trying to access media file size (ex. 3,7mb)... I read documentation and Duration and Size are accessed same way... I does work for Duration, but does not for size...

    Duration, which works... Did same way for Size and does not display any data...
    @ QString duration;
    int dur = player->metaData(QMediaMetaData::Duration).toInt();
    duration.append(QString("%1").arg(dur));
    ui->text4->setText(duration);@


Log in to reply