DJW602
24th May 2016, 01:17
My C# code with ActiveX Webbrowser:
webBrowser1.Document.GetElementsByTagName("A")[5];
I tried to make a program with activeX Webbrowser. The webBrowser1 is the name of ACTIVEX control. And I succeeded in C# with VS 2015 IDE. And now I need to work it out in C++ with QT frame(version 5.6).
and this is my attempt code:
QAxObject* myEles = MyWebObj->querySubObject("Document");
QAxObject* myEle = myEles->querySubObject("GetElementsByTagName(const Qstring&)", "A");
It seems that it can get Document correctly,but fail whatever next subobject is---it can compile successfully,but get error when running. It is really weird as I get everything right with ActiveX Excel with the same method.
I wonder what is wrong here.It is appreciated if someone can do it with the very ActiveX webbrowser.
And I wonder how to write to pick the element from a group with QT; Just like the example: I need to pick the 5th element. How to write it with QT?
webBrowser1.Document.GetElementsByTagName("A")[5];
I tried to make a program with activeX Webbrowser. The webBrowser1 is the name of ACTIVEX control. And I succeeded in C# with VS 2015 IDE. And now I need to work it out in C++ with QT frame(version 5.6).
and this is my attempt code:
QAxObject* myEles = MyWebObj->querySubObject("Document");
QAxObject* myEle = myEles->querySubObject("GetElementsByTagName(const Qstring&)", "A");
It seems that it can get Document correctly,but fail whatever next subobject is---it can compile successfully,but get error when running. It is really weird as I get everything right with ActiveX Excel with the same method.
I wonder what is wrong here.It is appreciated if someone can do it with the very ActiveX webbrowser.
And I wonder how to write to pick the element from a group with QT; Just like the example: I need to pick the 5th element. How to write it with QT?