I've got a Phonon::VideoPlayer which I've subclassed and reimplemented VideoPlayer::mouseDoubleClickEvent. I'm trying to have it enter fullscreen when double clicked, and exit when double clicked. So far, it will enter fullscreen, but then double click doesn't work.
VideoWindow.h
#pragma once
#include <QtGui>
#include <Phonon>
class VideoWindow : public Phonon::VideoPlayer
{
Q_OBJECT
public:
VideoWindow
(Phonon
::Category category,
QWidget * parent
= 0);
protected:
};
#pragma once
#include <QtGui>
#include <Phonon>
class VideoWindow : public Phonon::VideoPlayer
{
Q_OBJECT
public:
VideoWindow(Phonon::Category category, QWidget * parent = 0);
protected:
void mouseDoubleClickEvent( QMouseEvent *evt );
};
To copy to clipboard, switch view to plain text mode
VideoWindow.cpp
#include "VideoWindow.h"
VideoWindow
::VideoWindow(Phonon
::Category category,
QWidget *parent
) : VideoPlayer(category, parent)
{
}
void VideoWindow
::mouseDoubleClickEvent( QMouseEvent *evt
) {
this->videoWidget()->setFullScreen(
!this->videoWidget()->isFullScreen() );
evt->accept();
}
#include "VideoWindow.h"
VideoWindow::VideoWindow(Phonon::Category category, QWidget *parent)
: VideoPlayer(category, parent)
{
}
void VideoWindow::mouseDoubleClickEvent( QMouseEvent *evt )
{
this->videoWidget()->setFullScreen(
!this->videoWidget()->isFullScreen() );
evt->accept();
}
To copy to clipboard, switch view to plain text mode
Bookmarks