PDA

View Full Version : how to use ACTIVEX C# "webbrowser" in QT



DJW602
14th May 2016, 12:17
AIM: I wanna a program that has an embedded browser ,with which I need to search some certain html elements of a certain website.

The webbrowser is the component embeded in C#.
And I know how to take this COM in QT.---with code like these---


QAxWidget *MyWebView;
MyWebView = new QAxWidget(centralWidget);
MyWebView->setControl(QStringLiteral("{8856f961-340a-11d0-a96b-00c04fd705a2}"));


And my exact problem is about the properties of this COM.

In C#, to catch an html element. I would write it in this way:


HtmlElementCollection myEles;
myEles = webBrowser1.Document.All;



But how to convert it into QT C++?
I tried dynamicCall(), I put it in this way:

auto myEles = ui.MyWebView->dynamicCall("Document");
but what about the "All"?

I have no idea , hope someone knows about C# and QT could help me.

ps: the reason I did not use qwebkit or qwebengine is that the website to browse can only run rightly with IE render engine.