QDeclarativeVideo::QDeclarativeVideo(QDeclarativeItem *parent) : QDeclarativeItem(parent) , m_graphicsItem(0) { m_graphicsItem = new QGraphicsVideoItem(this); connect(m_graphicsItem, SIGNAL(nativeSizeChanged(QSizeF)), this, SLOT(_q_nativeSizeChanged(QSizeF))); }
void QDeclarativeVideo::classBegin() { m_graphicsItem = new QGraphicsVideoItem(this); connect(m_graphicsItem, SIGNAL(nativeSizeChanged(QSizeF)), this, SLOT(_q_nativeSizeChanged(QSizeF))); setObject(this); if (m_mediaService) { connect(m_playerControl, SIGNAL(audioAvailableChanged(bool)), this, SIGNAL(hasAudioChanged())); connect(m_playerControl, SIGNAL(videoAvailableChanged(bool)), this, SIGNAL(hasVideoChanged())); m_mediaObject->bind(m_graphicsItem); } }