Hello JimDaniel,
sorry for taking so long to answer you. I'll give you an example how i used the video Widget and the grabWidget:
// this code is inside a class that inherits a QWidget
m_MediaObject = new Phonon::MediaObject(this);
m_MediaObject->clearQueue ();
m_MediaObject->enqueue(Phonon::MediaSource(fileName)); // or setCurrentSource
m_MediaObject->play();
m_videoWidget = new Phonon::VideoWidget(this);
m_videoWidget->setGeometry(0,0,500,500);
Phonon::createPath(m_MediaObject, m_videoWidget);
m_videoWidget = new Phonon::VideoWidget(this);
m_videoWidget->setGeometry(500,500,500,500);
Phonon::createPath(m_MediaObject, m_videoWidget);
// if you want to grab the entire window
//QPixmap ecran = QPixmap::grabWindow(QApplication::desktop()->winId());
image.save("printScreen.bmp");
// this code is inside a class that inherits a QWidget
m_MediaObject = new Phonon::MediaObject(this);
m_MediaObject->clearQueue ();
m_MediaObject->enqueue(Phonon::MediaSource(fileName)); // or setCurrentSource
m_MediaObject->play();
m_videoWidget = new Phonon::VideoWidget(this);
m_videoWidget->setGeometry(0,0,500,500);
Phonon::createPath(m_MediaObject, m_videoWidget);
m_videoWidget = new Phonon::VideoWidget(this);
m_videoWidget->setGeometry(500,500,500,500);
Phonon::createPath(m_MediaObject, m_videoWidget);
// if you want to grab the entire window
//QPixmap ecran = QPixmap::grabWindow(QApplication::desktop()->winId());
QPixmap image= QPixmap::grabWidget(this);
image.save("printScreen.bmp");
To copy to clipboard, switch view to plain text mode
Now, the thing is that i put there two video widgets, because for some reason i cant grab anything from the first one .The second one works fine, and i can grab the widget(image) and save it to a file or work with ... When the two videoWidgets are playing side by side, as in the case above, the video inside them is scaled differently in the widgets.
I hope this helps you.
Bookmarks