Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. QML and Qt Quick
  4. Showing video in qml
Qt 6.11 is out! See what's new in the release blog

Showing video in qml

Scheduled Pinned Locked Moved Solved QML and Qt Quick
2 Posts 2 Posters 885 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • defsD Offline
    defsD Offline
    defs
    wrote on last edited by defs
    #1

    Hi,

    I am beginner in qml and qt, so my question is maybe little primitive, but after some hours of googling I didn't find appropriate answer.

    I want to show live camera output in qml app. I have C++ snippet that works in QtWidget app (I used code from camera manufacturer and this tutorial to do that:
    OpenGL Widget to show OpenCV images in a Qt GUI
    ), but don't know how to do that in QtQuick app. Can you give me some advice about that or some example easy to understand?

    I started to study this example: http://doc.qt.io/qt-5/gettingstartedqml.html#extending-qml-using-qt-c , but didn't sure will be that useful for me. Can I use Q_PROPERTY to send frames to qml?

    1 Reply Last reply
    0
    • ? Offline
      ? Offline
      A Former User
      wrote on last edited by
      #2

      Hi! You need to implement your own visual item for use with QtQuick. There are two options for this: Either create your own class inheriting from QQuickPaintedItem or create a class inheriting from QQuickItem. The second approach is a bit more complicated but has the best performance. The first appoach is slower but also simpler because you can use QPainter to render your item. See Writing QML Extensions with C++ to get an idea of how to use said first option.

      1 Reply Last reply
      0

      • Login

      • Login or register to search.
      • First post
        Last post
      0
      • Categories
      • Recent
      • Tags
      • Popular
      • Users
      • Groups
      • Search
      • Get Qt Extensions
      • Unsolved