Results 1 to 10 of 10

Thread: QWebView too slow

  1. #1
    Join Date
    Jul 2009
    Posts
    7
    Thanks
    1
    Platforms
    Windows

    Question QWebView too slow

    I'm writing a sample Qt application and using QWebView for a tiny custom browser.
    But till now I found 2 major issues with QWebView, like ...

    1. Its too slow to display the url using QWebView as compared to web browser (ex: Firefox)
    2. QWebView is not rendering Flash movies

    So, want to know why QWebView is slow as compared to Firefox.

    Thank you.

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

    Default Re: QWebView too slow

    In general WebKit tends to be faster than Firefox, so this is probably some configuration issue on your system. Flash should work as well, provided you have an ns-plugin for it installed. If you can see flash in Firefox, it means you do - whether WebKit can find it, that's a different issue. See the docs for QtWebKit about support for netscape plugins.

    Edit: here is an example code that works for me:
    Qt Code:
    1. #include <QtGui>
    2. #include <QtWebKit>
    3.  
    4.  
    5. int main(int argc, char **argv){
    6. QApplication app(argc, argv);
    7. QWebView wv;
    8. QWebPage *page = wv.page();
    9. QWebSettings *settings = page->settings();
    10. settings->setAttribute(QWebSettings::JavascriptEnabled, true);
    11. settings->setAttribute(QWebSettings::PluginsEnabled, true);
    12. wv.load(QUrl("http://www.youtube.com"));
    13. wv.show();
    14. return app.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 
    Last edited by wysota; 27th November 2009 at 07:56.
    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.


  3. #3
    Join Date
    Feb 2008
    Posts
    60
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWebView too slow

    Hi

    I have done my first sample in QtWebkit with the help of your below code.Thank you.
    I am able to run any URL using this.

    When I try to run the below URL in Firefox (MAC OS), it is played with the help of Flip4Mac plugin.
    http://www.researchchannel.org/webcast/asx/rtv-high.asx
    The QWebView cannot play this URL, and the debugger shows the below error.
    Error loading /Library/Internet Plug-Ins/DRM Plugin.bundle/Contents/MacOS/DRM Plugin: dlopen(/Library/Internet Plug-Ins/DRM Plugin.bundle/Contents/MacOS/DRM Plugin, 262): no suitable image found. Did find:
    /Library/Internet Plug-Ins/DRM Plugin.bundle/Contents/MacOS/DRM Plugin: unknown file type, first eight bytes: 0x4A 0x6F 0x79 0x21 0x70 0x65 0x66 0x66
    Debugger() was called!


    Is this error in QtWebkit.

    Regards,
    Jay.

  4. #4
    Join Date
    Feb 2008
    Posts
    60
    Thanks
    9
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: QWebView too slow

    Is anyone having idea on this?

    Regards,
    Jay.

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

    Default Re: QWebView too slow

    hi,

    @wysota, when you says "so this is probably some configuration issue on your system." could you tell me what kind of configuration is intended to work the best?

    I compiled qt with webkit for windowsCE, and I have poor Javascript performances. Any ideas??

    Regards,

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

    Default Re: QWebView too slow

    I have posted that sentence over three months ago so I don't remember what I meant exactly.

    How did you measure javascript performance?
    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.


  7. #7
    Join Date
    Mar 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QWebView too slow

    Quote Originally Posted by wysota View Post
    In general WebKit tends to be faster than Firefox, so this is probably some configuration issue on your system. Flash should work as well, provided you have an ns-plugin for it installed. If you can see flash in Firefox, it means you do - whether WebKit can find it, that's a different issue. See the docs for QtWebKit about support for netscape plugins.

    Edit: here is an example code that works for me:
    Qt Code:
    1. #include <QtGui>
    2. #include <QtWebKit>
    3.  
    4.  
    5. int main(int argc, char **argv){
    6. QApplication app(argc, argv);
    7. QWebView wv;
    8. QWebPage *page = wv.page();
    9. QWebSettings *settings = page->settings();
    10. settings->setAttribute(QWebSettings::JavascriptEnabled, true);
    11. settings->setAttribute(QWebSettings::PluginsEnabled, true);
    12. wv.load(QUrl("http://www.youtube.com"));
    13. wv.show();
    14. return app.exec();
    15. }
    To copy to clipboard, switch view to plain text mode 

    can Confirm very slow javascript dom with pyqt4 , qwebview
    I ve heard that webkit is very fast and google chrome runs very well on my system, dell latitude D830 ,MEPIS 11KDE pyqt 4.7.1
    But a very simple widget that displays a slideshow with fade out / in transitions , runs very slowly
    Last edited by wysota; 23rd March 2012 at 11:06. Reason: removed URL

  8. #8
    Join Date
    Mar 2009
    Location
    Brisbane, Australia
    Posts
    7,729
    Thanks
    13
    Thanked 1,610 Times in 1,537 Posts
    Qt products
    Qt4 Qt5
    Platforms
    Unix/X11 Windows
    Wiki edits
    17

    Default Re: QWebView too slow

    Thanks you for your observations.

    Was there a purpose to resurrecting this 2+ year old thread?

  9. #9
    Join Date
    Mar 2012
    Posts
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QWebView too slow

    Quote Originally Posted by ChrisW67 View Post
    Thanks you for your observations.

    Was there a purpose to resurrecting this 2+ year old thread?
    What do u mean?

    Yes there is a purpose: Qwebview STILL performs slow on some tasks..
    Some more observations:
    Qwebview runs ok when image transitions are made on the background image of a div , very common practice for image galleries..

    Qwebview does not perform well when transitions are made on the img tag example
    Last edited by wysota; 23rd March 2012 at 11:06. Reason: removed URL

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

    Default Re: QWebView too slow

    The URL you provided works fine for me in QWebView with Qt 4.7. I suggest you do some more testing next time before you spam a forum with your claims that something doesn't work as it should.
    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.


Similar Threads

  1. Replies: 3
    Last Post: 20th April 2010, 16:49
  2. Problem With QWebView
    By ivi2501 in forum Qt Programming
    Replies: 8
    Last Post: 2nd August 2009, 19:37
  3. slow down the flash within the qwebview?
    By billconan in forum Qt Programming
    Replies: 1
    Last Post: 20th July 2009, 13:49
  4. QWebView transparent problem
    By embedyy in forum Qt Programming
    Replies: 4
    Last Post: 16th January 2009, 06:20
  5. QWebView - retrieving information?
    By lamera in forum Qt Programming
    Replies: 1
    Last Post: 25th September 2008, 17:53

Tags for this Thread

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.