×

Discussion Board

Results 1 to 13 of 13
  1. #1
    Registered User
    Join Date
    Dec 2010
    Posts
    34

    Unhappy Another QWebView problem

    Hi,

    I am trying to use this code as suggested by wiki, but I am getting blank view both in the emulator and on the device. Any idea?

    Thanks

    Code:
    int main(int argc, char *argv[])
    {
        QApplication a(argc, argv);
     
        QWebView view;
        view.setStyleSheet("background-color:rgb(150,147,88); padding: 7px ; color:rgb(255,255,255)");
        view.load(QUrl("http://www.google.com"));
        view.showMaximized();
     
        return a.exec();
    }

  2. #2
    Registered User
    Join Date
    Dec 2010
    Posts
    34

    Cannot get QWebView to show a simple web page

    Hi,

    Are there any reasons why I cannot show google.com in my Qt application?

    Thanks

  3. #3
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Cannot get QWebView to show a simple web page

    There are plenty of reasons for that. Check if you have network connection, does it require proxy settings?

  4. #4
    Registered User
    Join Date
    Dec 2010
    Posts
    34

    Re: Cannot get QWebView to show a simple web page

    I can navigate to the same page using the phone built-in browser. So I am assuming that the problem is with my application. I used the code suggested by the nokia wiki site.

    Any other ideas would be much appreciated.

  5. #5
    Super Contributor
    Join Date
    Oct 2009
    Posts
    4,326

    Re: Another QWebView problem

    You may check QWebView::loadStarted() and QWebView::loadFinished() signals.

  6. #6
    Registered User
    Join Date
    Dec 2010
    Posts
    3

    Re: Another QWebView problem

    If you cant load it, get the URL as a String and pass it to webview.

    Assume that QString url = " < link>"

    After that use view.setUrl(url);

    It works . try it

  7. #7
    Registered User
    Join Date
    Mar 2011
    Posts
    5

    Re: Cannot get QWebView to show a simple web page

    add following code in .pro

    QT += network

    QT += webkit network

  8. #8
    Super Contributor
    Join Date
    Mar 2009
    Posts
    1,024

    Re: Cannot get QWebView to show a simple web page

    Quote Originally Posted by sajidafaiyaz View Post
    add following code in .pro

    QT += network

    QT += webkit network
    sevdotcom can already build the code. So this is useless.

  9. #9
    Registered User
    Join Date
    Mar 2011
    Posts
    9

    Re: Another QWebView problem

    Hi, Even I'm also facing the same issue,
    Tried many options, but it shows a blank page.

    Regards,
    VIjay.

  10. #10
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Another QWebView problem

    Sorry to here that even you are affected. Still, you don't provide any info about your environment. Is there a proxy blocking your access to the site? Are you running this application on PC or mobile phone? What exactly have you tried and what was the result?

    Try also to open new threads for your problem, and only resurrect new ones if you have something to add to the conversation.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  11. #11
    Registered User
    Join Date
    Mar 2011
    Posts
    5

    Re: Another QWebView problem

    there are 3 thing:
    1) check your internet connection and
    2) add follwong in your .pro file
    QT += network
    QT += webkit network

    3) use the following code to load yahoo on you webview
    ui->webView->load(QUrl("http://ca.yahoo.com/?p=us"));

    it load successfully at my Pc...hope it would solve your problem

  12. #12
    Registered User
    Join Date
    Mar 2011
    Posts
    1

    Re: Another QWebView problem

    I'm having the same problem. Works fine in simulator but not on nokia c7 device.

    Tried to load http://www.google.com and local HTML file. Same problem.

    Can browse normally with browser on device, so internet is reachable.

    I have tried to double the heap size. Same problem.

    I have this in my .PRO file:
    Code:
        QT += core
        QT += gui
        QT += sql
        QT += network
        QT += webkit network
        QT += multimedia
         
        TARGET = MyApp
        TEMPLATE = app
         
        DEFINES += NETWORKACCESS
         
        CONFIG += mobility
        MOBILITY += multimedia
        MOBILITY += location
        MOBILITY += bearer
         
        symbian {
        TARGET.UID3 = 0xe4fd1392
         
        TARGET.CAPABILITY += NetworkServices ReadUserData WriteUserData
        TARGET.CAPABILITY += Location
         
        TARGET.EPOCSTACKSIZE = 0x14000
        TARGET.EPOCHEAPSIZE = 0x020000 0x8000000
        }
         
        debug {
        MMP_RULES -= "PAGED"
        MMP_RULES += "UNPAGED"
        }
    Signal loadStarted() gets called, but loadFinished(bool) signal never gets called.

    Anybody?

    Tnx!

  13. #13
    Registered User
    Join Date
    Jun 2007
    Location
    Mumbai, India
    Posts
    1,998

    Re: Another QWebView problem

    Sometimes the access point you are using might have proxy too. If that is the case just try it once with some wifi connection(with no proxy reqd) - just to confirm its not due to the proxy settings in the Access point.

Similar Threads

  1. Replies: 3
    Last Post: 2011-03-04, 01:53
  2. How to show web browser to show internet page
    By sashaslonmailer in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2008-04-08, 22:22
  3. Show text as link to web page
    By Svat_ in forum Symbian
    Replies: 2
    Last Post: 2007-08-03, 22:37

Posting Permissions

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