PDA

View Full Version : HTML5 with QT Webkit 4.6



Peter Jerald
12th July 2010, 11:18
Hi,

I am using QT 4.6.2. I written a sample program in html, which will invokes a video file from specified location. I invoked that html file using QT Webkit. when i run the program. I cant able to see the video in the page.

I dont know, what happened?

QT Program:
--------------------

#include <QtGui/QApplication>
#include <QWebView>

int main(int argc, char *argv[])
{
QApplication a(argc, argv);

QWebView *view = new QWebView();
view->load(QUrl("http://localhost:8080/html5/html5.html"));
view->show();

return a.exec();
}

HTML File :
--------------------

<html>
<head>
<title>HTML 5 Test page</title>
</head>
<body>
<video width="640" height="360" controls preload="none">
<source src="big_buck_bunny.webm" type="video/webm" />
<source src="big_buck_bunny.ogv" type="video/ogg" />
</video>
</body>
</html>

When i invoked the above Html file in firefox. I can able to see the video but in QT only the player controls is displayed.

Please help me out to solve this problem.

Thanks in advance

Regards

A. Peter Jerald