How to use a public Qwebelement variable
Hello, when I try to use the Qwebelement as a public variable, it doesn't work. For this reason I want to know what am I doing wrong?
This is my code:
Header
Code:
private: QWebElement *element;
Cpp
Code:
element = ui->webView->page()->currentFrame()->findFirstElement("#"+ElementID);
However the compiler send me some errors and I am not sure how to solve that
Re: How to use a public Qwebelement variable
First a recommendation: always tell us the error you get (when you get one).
Anyway the most obvious problem is that conforming to the documentation findFirstElement returns a QWebElement object and you try to assign that to a QWebElement* (use an object instead of a pointer to hold a copy of that return value).
If you are having a different problem please write more information.