Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QCameraViewfinder: How to remove last frame after disconnection
Qt 6.11 is out! See what's new in the release blog

QCameraViewfinder: How to remove last frame after disconnection

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 683 Views
  • 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.
  • JoserodrigoJ Offline
    JoserodrigoJ Offline
    Joserodrigo
    wrote on last edited by
    #1

    I hava a QCameraViewfinder connected to
    a QCamera. After the device disconnection, the
    last received frame still in the viewfinder.
    How can I make the app reset the viewfinder
    to a Black Screen automatically? There are signals for this? Or properties?

    Thanks in advice.

    1 Reply Last reply
    0
    • O Offline
      O Offline
      OveF
      wrote on last edited by
      #2

      from your QCameraViewfinder object, get the QMediaObject pointer.

      [virtual] QMediaObject *mediaObject() const

      then, from this pointer get the QMediaService * pointer.

      [virtual] QMediaService *QMediaObject::service() const

      This pointer gives you access to the mediaplayer controle

      QMediaPlayerControl *control = qobject_cast<QMediaPlayerControl *>(
      mediaService->requestControl("org.qt-project.qt.mediaplayercontrol/5.0"));

      Maybe this is what you are looking for

      OveF

      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