Results 1 to 5 of 5

Thread: QWebView not compatible with many websites?

  1. #1
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    1
    Qt products
    Platforms
    Windows

    Question QWebView not compatible with many websites?

    Hi there,

    I've got problems getting several websites working in Qt's built in browser. I'm using PyQt4, but that shouldn't make a difference, should it?

    Qt Code:
    1. def __init__(self, parent = None):
    2. super(MapViewer, self).__init__(parent)
    3. self.load(QUrl("http://qt.nokia.com))
    To copy to clipboard, switch view to plain text mode 

    That's everything I do with my subclass of QWebView (instead of initializing it from another class of course). Works fine for HTML, but JavaScript, like in the samplepage, doesn't work correctly:


    That's how it looks like, and that's how it should look like:


    Is that a known issue? I heard that executing JavaScript via QWebView works fine, why shouldn't it work when implemented in the displayed website itself?


    Hope you guys can help me,
    aRestless

  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 not compatible with many websites?

    What does javascript have to do with images you posted?
    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
    Jan 2007
    Posts
    4
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: QWebView not compatible with many websites?

    set the attribute QWebSettings::JavascriptEnabled to true

    wysota - the images are loaded on that web page from js

  4. #4
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    1
    Qt products
    Platforms
    Windows

    Default Re: QWebView not compatible with many websites?

    JavaScript is enabled. As you can see in the first picture, the menu's text is loaded, but not scaled correctly. This Non-correct-scaling seems to be the problem on most websites. Maybe QWebView offers wrong information about the resolution for example so the built in JS scales to the wrong size?

  5. #5
    Join Date
    Apr 2010
    Posts
    3
    Thanks
    1
    Qt products
    Platforms
    Windows

    Default Re: QWebView not compatible with many websites?

    Problem solved. I had the wrong version of PyQt4 for my Python installation. I expected Python 2.6 to be installed, but it was 2.5 instead. I didn't have any compatibility problems before, so I didn't expect the source of the problem there. Anyway, thanks for the help.

Similar Threads

  1. QWebView + img + OSx
    By bunjee in forum Qt Programming
    Replies: 3
    Last Post: 14th December 2009, 21:47
  2. Which Linux distribution is best for building compatible apps?
    By Oxidative in forum Installation and Deployment
    Replies: 8
    Last Post: 9th July 2009, 17:13
  3. Is Qt 4.4.0 compatible with the current MinGW 5.1.4 release?
    By BernieW in forum Installation and Deployment
    Replies: 4
    Last Post: 1st August 2008, 00:16
  4. QwebView
    By peace_comp in forum Qt Programming
    Replies: 0
    Last Post: 30th July 2008, 19:20
  5. How to find out the earliest compatible version of a library?
    By jamadagni in forum General Discussion
    Replies: 2
    Last Post: 29th August 2006, 02:01

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.