使用了
<<QT高级编程>>中的例子程序
playvideo,将窗体改为透明,则不能
播放视频文件,请问有
没有解决方案,多谢?
在原来的代码中增加了
3行:
int main(int argc, char *argv[])
{
QApplication app(argc, argv);
app.setApplicationName(app.translate("main", "Play Video"));
app.setWindowIcon(QIcon(":/icon.png"));
#ifdef Q_WS_MAC
app.setCursorFlashTime(0);
#endif
MainWindow window;
window.setWindowFlags(Qt::FramelessWindowHint);
window.setAttribute(Qt::WA_TranslucentBackground, true);
window.resize(600,400);
window.show();
return app.exec();
}