Details
-
Bug
-
Resolution: Done
-
P2: Important
-
6.2.0
-
None
-
-
c4f75ba54de140277e43b754547ab88b383816df (qt/qtmultimedia/dev) 37e03b2d940c682604c4f27ded2ec4b97ebadce4 (qt/qtmultimedia/6.2)
Description
The following example uses QtMultimedia to playback a video:
import QtQuick import QtMultimedia Window { width: 1920 height: 1080 visible: true MediaPlayer { id: player source: "https://file-examples-com.github.io/uploads/2017/04/file_example_MP4_1920_18MG.mp4" audioOutput: AudioOutput {} videoOutput: videoOutput } VideoOutput { id: videoOutput anchors.fill: parent anchors.margins: 20 } Component.onCompleted: { player.play() } }
Using qmllint on this file produces a strange yet interesting output:
Warning: main.qml:49:17: Binding assigned to "fill", but no property "fill" exists in the current element. anchors.fill: parent ^^^^ Warning: main.qml:50:17: Binding assigned to "margins", but no property "margins" exists in the current element. anchors.margins: 20 ^^^^^^^ Warning: main.qml:49:9: unknown grouped property scope anchors. anchors.fill: parent ^^^^^^^ Warning: main.qml: QQuickItem was not found. Did you add all import paths? Warning: main.qml:49:23: Unqualified access anchors.fill: parent ^^^^^^
Besides missing anchors, the part Warning: main.qml: QQuickItem was not found. Did you add all import paths? is pretty awkward.