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
Qt Code:
  1. private: QWebElement *element;
To copy to clipboard, switch view to plain text mode 

Cpp
Qt Code:
  1. element = ui->webView->page()->currentFrame()->findFirstElement("#"+ElementID);
To copy to clipboard, switch view to plain text mode 

However the compiler send me some errors and I am not sure how to solve that