Discussion Board

Results 1 to 3 of 3
  1. #1
    Regular Contributor
    Join Date
    Aug 2009

    How to display Google Map Details in another Qt UI

    Hi Friends,

    I am working on a project that will fetch data from the google map and should display the fetched data in another UI window.

    Currently, I am able to display the google marker and the respective marked data on QWebView control after a single left mouse click. But I want to redirect these displayed data to another UI Window.

    I don't know how to perform this operation. If any body has any idea, please share with me.

    Kindly go through the following link to access the whole project I have done so far:



  2. #2
    Regular Contributor
    Join Date
    Aug 2009

    Re: How to display Google Map Details in another Qt UI

    Hi... this is just an update:

    I followed Form Extractor Example as a solution to the problem. Here also I am facing some issues.

    Please check the example details:


    As per the above link I tried to build the Form Extractor Project, but I am confused after the Submit button is clicked, because I don't know which "Q_SIGNALS" of "qwebframe.h" is called.:

    The example don't have the "form.html" that is required to load, so I developed my own "form.html".

    The contents of my modified "form.html" is:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    <html xmlns="http://www.w3.org/1999/xhtml">
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Form Extractor Example</title>

    <body onload="" onunload="" topmargin="0" leftmargin="0">
    <div id="map" style="width: 341px; height: 271px"></div>
    <form name="myform" >
    <div align="center">
    First name:
    <input name= "firstname" type="text" size="25" value="">
    Last name:
    <input name= "lastname" type="text" size="25" value=""><br>
    <input type="radio" name="group1" value="Male" checked>Male<br/>
    <input type="radio" name="group1" value="Female"> Female<br/>
    <input name= "check" type="checkbox" size="25" value="" /> Check here if you would like to receive regular updates from us: <br>
    <input type=submit value = "Sumbit"/>

    The modified "formextractor.cpp" file is:

    #include "formextractor.h"

    #include <QWebElement>

    FormExtractor::FormExtractor(QWidget *parent, Qt::WFlags flags)
    : QWidget(parent, flags)
    connect(ui.webView->page()->mainFrame(), SIGNAL(loadFinished()),this, SLOT(populateJavaScriptWindowObject()));
    connect(ui.webView->page()->mainFrame(), SIGNAL(loadFinished()), this, SLOT(submit()));
    //connect(ui.webView->page()->mainFrame(), SIGNAL(loadStarted()), this, SLOT(submit()));
    //connect(ui.webView->page()->mainFrame(), SIGNAL(initialLayoutCompleted()), this, SLOT(submit()));
    //connect(ui.webView->page()->mainFrame(), SIGNAL(provisionalLoad()), this, SLOT(submit()));
    //connect(ui.webView->page()->mainFrame(), SIGNAL(javaScriptWindowObjectCleared()), this, SLOT(submit()));

    resize(300, 300);


    void FormExtractor::submit()
    QWebFrame *frame = ui.webView->page()->mainFrame();

    QWebElement firstName = frame->findFirstElement("#firstname");
    QWebElement lastName = frame->findFirstElement("#lastname");
    QWebElement maleGender = frame->findFirstElement("#genderMale");
    QWebElement femaleGender = frame->findFirstElement("#genderFemale");
    QWebElement updates = frame->findFirstElement("#updates");


    if (maleGender.evaluateJavaScript("this.checked").toBool())
    else if (femaleGender.evaluateJavaScript("this.checked").toBool())

    if (updates.evaluateJavaScript("this.checked").toBool())

    void FormExtractor:opulateJavaScriptWindowObject()
    ui.webView->page()->mainFrame()->addToJavaScriptWindowObject("formExtractor", this);

    By looking this example please figure out the problem!!!

    Last edited by RajeevSahu; 2010-08-03 at 06:56.

  3. #3
    Regular Contributor
    Join Date
    Aug 2009

    Re: How to display Google Map Details in another Qt UI

    Hello friends...

    Any suggestions on this issue???

Similar Threads

  1. Google map can not display corrected
    By quangndba in forum Symbian Networking & Messaging (Closed)
    Replies: 4
    Last Post: 2010-04-20, 09:51
  2. Google Map
    By RupeshD in forum Mobile Java General
    Replies: 6
    Last Post: 2009-04-09, 01:53
  3. Replies: 2
    Last Post: 2009-02-13, 03:19
  4. Google map
    By krtrivdi in forum Symbian
    Replies: 9
    Last Post: 2008-12-09, 19:43

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts