Results 1 to 5 of 5

Thread: QWebView problem to display the web page

  1. #1
    Join Date
    Dec 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Unhappy QWebView problem to display the web page

    Hi,

    In the following code I am trying to display the web page using QWebView..but it displays a BLANK page(In windows machine) . As this problem is discussed many times in this forum ,but no one given the solution. I include QT += webkit in .pro file also,
    and there is no compile time or run time warnings.

    And it displays the intraweb pages but not the other web pages like google, qt.nokia.com etc..
    Struggling in this from last two days....


    code:
    -------


    #include <QtGui>
    #include <QtWebKit>

    #include <QDebug>


    int main(int argc, char **argv)
    {
    QApplication app(argc, argv);

    QWebView *wv = new QWebView();
    QWebPage *page = wv->page();
    QWebSettings *settings = page->settings();

    settings->setAttribute(QWebSettings::JavascriptEnabled, true);
    settings->setAttribute(QWebSettings::PluginsEnabled, true);
    settings->setAttribute(QWebSettings::PrivateBrowsingEnabled , true);

    QUrl url = QUrl("http://qt.nokia.com/"); // http://www.google.co.in/
    wv->load(url);
    wv->setFocus();
    wv->show();

    return app.exec();
    }



    Thanks for Help..

  2. #2
    Join Date
    Dec 2009
    Posts
    14
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Wink Re: QWebView problem to display the web page

    Ho its solved finally.... !!!!!!!

    Need to set the QNetworkProxy with the setType - QNetworkProxy::HttpProxy,proxy hostname,port,user and password.
    Then set the setApplicationProxy .


    Thanks....

  3. #3
    Join Date
    Jan 2010
    Posts
    1
    Qt products
    Qt3 Qt4 Qt/Embedded Qt Jambi PyQt3 PyQt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60

    Default Re: QWebView problem to display the web page

    hi ansar,

    I compile Qt source code for Windows Mobile & run some GUI application successfully. But I couldn't find qtwebkit.lib or dll. It seem webkit module isn't included in default build. What should I do?

    Thank

  4. #4
    Join Date
    Feb 2010
    Posts
    12
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QWebView problem to display the web page

    Hi,

    ansar, you have to configure Qt wtih the option -webkit

    ex: configure -release -fast -platform win32-msvc2008 -xplatform wincewm60professional-msvc2008 -webkit

  5. #5
    Join Date
    Feb 2010
    Posts
    12
    Qt products
    Qt4 Qt/Embedded
    Platforms
    Windows

    Default Re: QWebView problem to display the web page

    If that works, could you telle me what do you think about the performances of the QWebView?

Similar Threads

  1. Html page Display in QWebView
    By Tavit in forum Qt Programming
    Replies: 4
    Last Post: 10th July 2010, 15:39
  2. Reg QWebview Display
    By Tavit in forum Qt Programming
    Replies: 0
    Last Post: 5th August 2009, 15:19
  3. How to display xml file in qwebview?
    By richardander in forum Qt Programming
    Replies: 2
    Last Post: 31st May 2009, 21:10
  4. Widget to display an HTML page ?
    By probine in forum Qt Tools
    Replies: 3
    Last Post: 11th October 2006, 18:55
  5. QWidget display on 2 stack widget page
    By spawnwj in forum Qt Programming
    Replies: 3
    Last Post: 4th September 2006, 12:07

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.