Here is a snippet of code that works on windows and linux that I use for a QGraphicsWebView, where the filename is stored in FlashFile:

QFileInfo info(FlashFile);
QString path = info.absolutePath() + "/";
QString fname = FlashFile;
fname.remove(path);
QUrl baseUrl = QUrl::fromLocalFile(path);
#ifdef Q_OS_LINUX
QString wmode = "opaque";
#else
QString wmode = "transparent"; // works best for windows
#endif
QString html = QString("<html><body><embed src='%1' wmode='%2' width=%3 height=%4>"
"</embed></body></html>").arg(fname).arg(wmode).arg(w).arg(h);
setHtml(html, baseUrl);