Results 1 to 9 of 9

Thread: opening webpage using qt....

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: opening webpage using qt....

    I have a better idea - you explain what you did in code and I'll say what you did wrong (if anything).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  2. #2
    Join Date
    Apr 2009
    Posts
    58
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: opening webpage using qt....

    hi,

    i used this code:

    #include <QApplication>
    #include <QWebView>

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

    QWebView *view = new QWebView();
    view->load(QUrl("http://www.webstandards.org/files/acid2/test.html"));
    view->show();

    return app.exec();
    }

    but it is not showing the webpage.it is showing an empty widget.I want to change the proxy settings .
    i tried that and i posted that code in my first post.
    how to change the proxy settings of qwebview??
    plzz help n tell me how to load a webpage and how to change proxy settings..

  3. #3
    Join Date
    Jan 2008
    Location
    Poland
    Posts
    687
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Thanks
    4
    Thanked 140 Times in 132 Posts

    Default Re: opening webpage using qt....

    read once again what wysota posted already... the solution is already there!
    I would like to be a "Guru"

    Useful hints (try them before asking):
    1. Use Qt Assistant
    2. Search the forum

    If you haven't found solution yet then create new topic with smart question.

  4. #4
    Join Date
    Apr 2009
    Posts
    58
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: opening webpage using qt....

    i used QNetworkProxy::setApplicationProxy() also. but still code doesn't work..

    Widget::Widget(QWidget *parent): QWidget(parent)
    {
    QNetworkProxy proxy;
    proxy.setType(QNetworkProxy::HttpProxy);
    proxy.setHostName("10.8.58.40");
    proxy.setPort(8080);
    QNetworkProxy::setApplicationProxy(proxy);
    QWebView *web=new QWebView();
    web->load(QUrl("http://www.google.com"));
    web->show();
    }

  5. #5
    Join Date
    Jan 2006
    Location
    Warsaw, Poland
    Posts
    33,373
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows Android Maemo/MeeGo
    Thanks
    3
    Thanked 5,019 Times in 4,795 Posts
    Wiki edits
    10

    Default Re: opening webpage using qt....

    Which version of Qt do you use? Releases earlier than 4.5.0 don't use applicationwide proxy settings for WebKit. It should work in 4.5.0 (at least it had been said it would work).
    Your biological and technological distinctiveness will be added to our own. Resistance is futile.

    Please ask Qt related questions on the forum and not using private messages or visitor messages.


  6. #6
    Join Date
    Apr 2009
    Posts
    58
    Qt products
    Qt4
    Platforms
    Unix/X11
    Thanks
    3
    Thanked 1 Time in 1 Post

    Default Re: opening webpage using qt....

    i am using qt-sdk-2009 ,qtcreator 1.0 based on qt 4.5.........
    but still it is not working.....

Similar Threads

  1. Replies: 9
    Last Post: 23rd August 2012, 01:01
  2. "Error opening framebuffer device"
    By rishiraj in forum Installation and Deployment
    Replies: 8
    Last Post: 1st April 2009, 07:29
  3. Can't get webpage to open using 'QHttp'
    By rishiraj in forum Newbie
    Replies: 6
    Last Post: 30th January 2009, 11:24
  4. Re: Opening Project file Issue in Edyuk
    By philwinder in forum Qt-based Software
    Replies: 6
    Last Post: 5th May 2008, 21:49
  5. Opening swf file in the default browser
    By munna in forum Qt Programming
    Replies: 16
    Last Post: 5th May 2006, 10:33

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
  •  
Qt is a trademark of The Qt Company.