PDA

View Full Version : QWebView JavaScript problem with ASP.NET menus



EgorSharin
8th February 2011, 05:40
I found a serious problem with how QtWebKit/QWebView renders some of JavaScript content on some websites created with ASP.NET.
I don't know if there is a solution. But if there is one, could someone be so kind as to point me in the right direction, please?

I thought that the problem was in my ASP.NET website, but then it turned out that the same happens with other ASP.NET sites.
Also, it doesn't seem that I am doing anything wrong in my Qt code (event though I am a newbie to Qt, and I *can* do a lot of wrong things). But the same happens in Qt -> demos -> browser sample, - unmodified code.
Finally, I am sure that the problem lies in the QWebView, because it does not occur in the simplest example which uses IE ActiveX (Qt -> examples -> activex -> webbrowser).

To see what exactly I am talking about, please go to one of the pages listed below and try to hover the mouse over menu items.
If you do this in Internet Explorer, Firefox, or some other "real" browser, they work just fine: on mouse over, submenu items popup.
However, if you view those pages in a QWebKit-based browser (be it a sample in Qt or Arora browser or a simple test with a QWebView), submenu items never appear.

Yes, I figured that Microsoft made its own browser to work well with its own web technology.
Yes, they suck.

But it does not change the fact that QWebView does not render some [probably, a huge amount of] web sites properly.

For examples, I selected web pages which show demos of menu controls from two of the leading .NET controls manufacturers:
(1) http://demos.telerik.com/aspnet-ajax/menu/examples/default/defaultcs.aspx
(2) http://samples.infragistics.com/2010.3/WebFeatureBrowser/Default.aspx --> select "WebDataMenu" --> select "Client Events"

Is there a solution?
I set all those JavaScript-related properties to "true" (even those which are "true" by default), but that did not help. :(

What am I missing here?
Please advise.

Thank you very much.

-- Egor

EgorSharin
15th February 2011, 08:33
I found an answer to my question:
NO, there is NO solution.

I assume that there is no solution because the same problem happens even if I am looking at the same web pages in the latest Google Chrome and the latest Apple Safari.

Since both are based on WebKit, I suppose the problem lies not with Nokia's implementation (that is, QWebKit/QWebView), but with the WebKit itself: probably, in how WebKit handles some JavaScript.

However, the same problematic web pages are displayed properly in Internet Explorer 8 (Trident-based) and in Firefox 3.6.13 (Gecko-based).

Oh, well...

Other than this rare issue, QWebKit is a *very* attractive solution.