Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-97584

qmllint error on VideoOutput: "QQuickItem was not found. Did you add all import paths?"

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • P2: Important
    • 6.3.0 Alpha
    • 6.2.0
    • QML: Tooling
    • None
    • macOS
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            max.goldstein Maximilian Goldstein
            c.lorquet Cyril Lorquet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes