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?
Code:
def __init__(self, parent = None):
super(MapViewer, self).__init__(parent)
self.
load(QUrl("http://qt.nokia.com))
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:
http://wgkarlsruhe.de/Screenshot1.JPG
That's how it looks like, and that's how it should look like:
http://wgkarlsruhe.de/Screenshot2.JPG
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
Re: QWebView not compatible with many websites?
What does javascript have to do with images you posted?
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
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?
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.