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

QWidget::grabWidget() not working for video files played on Phonon

    XMLWordPrintable

Details

    • Bug
    • Resolution: Out of scope
    • P2: Important
    • None
    • 4.7.4, 4.8.5, 5.2.0
    • (Inactive) Phonon
    • None
    • Windows 7

    Description

      Launch a Phonon videowidget (inside a QWidget derived class), play a video file (tested with *.avi file) and try to grab a pixmap from the video file:

      pMedia = new Phonon::MediaObject(this);
      pVideoWidget = new Phonon::VideoWidget(this);
      Phonon::createPath(pMedia, pVideoWidget);
      pMedia->setCurrentSource(Phonon::MediaSource("myvideo.avi"));
      pMedia->play();

      QPixmap pixmap = QPixmap::grabWidget( pVideoWidget);
      --> returned pixmap is empty i.e. does not contain a capture from the video file

      tested also:
      QImage image = pVideoWidget->snapshot();
      --> returns a null QImage

      QPixmap pixmap = QPixmap::grabWindow(pVideoWidget->winId());
      --> returned pixmap is empty i.e. does not contain a capture from the video file

      Attachments

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

        Activity

          People

            ylopes Yoann Lopes
            qtcomsupport Qt Support
            Votes:
            7 Vote for this issue
            Watchers:
            8 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes