Results 1 to 1 of 1

Thread: How to Communicate between Qt and a HTML page

  1. #1
    Join Date
    Aug 2012
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default How to Communicate between Qt and a HTML page

    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 :
    Qt Code:
    1. QTextBrowser* browser = new QTextBrowser();
    2.  
    3. browser->setFixedSize(500,500);
    4. browser->setSource(*new QUrl("test.html"));
    5. browser->setWindowTitle("QTextBrowser Sample");
    6. browser->show();
    To copy to clipboard, switch view to plain text mode 

    is there any mechanism like signal/slot ??

    thanks in advance...
    Last edited by AbinaThomas; 27th August 2012 at 12:05.

Similar Threads

  1. Hot do I get HTML source from a web page?
    By earendil in forum Newbie
    Replies: 9
    Last Post: 16th March 2012, 15:15
  2. jump from one html page to another html page
    By RENOLD in forum Qt Programming
    Replies: 4
    Last Post: 10th February 2012, 04:41
  3. Can't load HTML page with QNetworkReply
    By T4ng10r in forum Qt Programming
    Replies: 2
    Last Post: 19th September 2011, 06:56
  4. Html page Display in QWebView
    By Tavit in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2010, 15:39
  5. Widget to display an HTML page ?
    By probine in forum Qt Tools
    Replies: 3
    Last Post: 11th October 2006, 18:55

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.