退出全屏就把这两个再改回来
vw->setWindowFlags(Qt::FramelessWindowHint);
vw->setWindowState(Qt::WindowMaximized);
C/C++ code
/*
* by microsky2813@hotmail.com
*
*/
#include<QApplication>
#include<phonon/videoplayer.h>
#include<phonon/mediasource.h>
#include<phonon/VideoWidget>
#include<phonon>
int main(int argc, char *argv[]) {
QApplication app(argc, argv);
Phonon::MediaObject *media = new Phonon::MediaObject();
Phonon::VideoWidget * vw=new Phonon::VideoWidget();//视频
vw->setWindowFlags(Qt::FramelessWindowHint);
vw->setWindowState(Qt::WindowMaximized);
Phonon::AudioOutput *audioOutput = new Phonon::AudioOutput();//声音
media->setCurrentSource(Phonon::MediaSource("10.wmv"));
Phonon::createPath(media, audioOutput);
Phonon::createPath(media,vw);
Phonon::VolumeSlider *volumeSlider = new Phonon::VolumeSlider(vw);
volumeSlider->setAudioOutput(audioOutput);
media->play();
vw->show();
return app.exec();
}