How can I get the length of a song in Qt 5.1 API? I think I can read it using Length
metadata but I'm not sure if this metadata will be available for all audio files.
相关问题
- Sorting 3 numbers without branching [closed]
- QML: Cannot read property 'xxx' of undefin
- Can we recover audio from MFCC coefficients?
- How to compile C++ code in GDB?
- Why does const allow implicit conversion of refere
相关文章
- ubuntu20.4中c#通过c++库调用python脚本
- Qt槽函数自动执行多遍
- Class layout in C++: Why are members sometimes ord
- How to mock methods return object with deleted cop
- Which is the best way to multiply a large and spar
- C++ default constructor does not initialize pointe
- Selecting only the first few characters in a strin
- What exactly do pointers store? (C++)
You seem to be looking for the
duration
property.This would be the QML solution:
This would be the C++ solution:
The other way you can achieve this is using
QMediaPlayer
. An example would be:I hope this can help.