I want to play a video but it is showing invalid property.
-
@Biswa The error in application output say Media player is not defined.So maybe your code does not load QtMultimedia Module properly. You will need to check the import of Qt Multimedia
-
Dear all, below i have attached output screenshot but why "autoPlay and autoLoad" is showing Invalid property .
-
@Biswa Are you using Qt 5? Your import statements suggest you do.
But
autoPlay
is not available in Qt 6 so perhaps you are trying to use Qt6 and that is why it fails? -
@Biswa are you using qt5.15?
-
@Biswa are you using qt5.15?
@Ronel_qtmaster yes
-
@Ronel_qtmaster yes
@Biswa it should work, the property is clearly there: https://doc.qt.io/qt-5/qml-qtmultimedia-video.html#autoPlay-prop
Anyway, as a workaround you can remove that line and trigger the play manually instead (for example using
Component.onCompleted
slot).