本页内容

mediaMetaData QML Value Type

提供媒体文件的元数据。更多...

Import Statement: import QtMultimedia

方法

详细说明

元数据是描述媒体的补充数据。有关可用的元数据属性,请参见QMediaMetaData 。

方法文档

void clear()

从 MediaMetaData 对象中删除所有数据。

void insert(Key k, variant value)

将一个value 插入到键中:k 。

bool isEmpty()

如果元数据中不包含任何项目,则返回true ;否则返回false 。

list<Key> keys()

返回一个 MediaMetaData.Keys 的列表。

string metaDataKeyToString(Key key)

返回key 的字符串表示形式,该表示形式可在向用户展示元数据时使用。

void remove(Key k)

从键k 中删除元数据。

string stringValue(Key key)

返回键key 对应的元数据,格式为QString 。

此功能主要旨在简化向用户展示元数据的过程。

variant value(Key key)

返回键key 对应的元数据值;如果该键没有元数据,则返回nullQVariant 。

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.