PDA

View Full Version : How to Communicate between Qt and a HTML page



AbinaThomas
27th August 2012, 07:50
Hi,

I am trying to find a way to connect a button in HTML to an action in my C++/Qt application. I loaded an html file in QT app using QTextBrowser object. If i click a button in this html file, the Qt application should respond. I also might want to implement it vice versa: so that an action in the Qt application would cause a response in the HTML page. Please suggest a suitable solution.

My sample code is :


QTextBrowser* browser = new QTextBrowser();

browser->setFixedSize(500,500);
browser->setSource(*new QUrl("test.html"));
browser->setWindowTitle("QTextBrowser Sample");
browser->show();


is there any mechanism like signal/slot ??

thanks in advance...