PDA

View Full Version : invalid use of incomplete type 'class QWebFrame'



rahulvishwakarma
30th April 2016, 09:03
hi to all,
I've centos 6.6 and qt5.3.2 (x86). I am upgrading clipgrab-3.5.6 (qt4 ) to qt5 and having this problem :-


QString video_dailymotion::getQualityUrl(QString json, QString quality)
{
QWebView* view = new QWebView();
view->setHtml("<script>function data() {return " + json + ";}</script>");
QString result = view->page()->mainFrame()->evaluateJavaScript("data().metadata.qualities['" + quality + "'][0].url").toString();

view->deleteLater();
return result;
}

error :-


/opt/software/clipgrab-3.5.6/video_dailymotion.cpp:120: error: invalid use of incomplete type 'class QWebFrame'
result = view->page()->mainFrame()->evaluateJavaScript("data().metadata.qualities['" + quality + "'][0].url").toString();

how to solve this problem. why having this problem.

d_stranz
30th April 2016, 16:46
why having this problem.

Because your cpp file probably hasn't #include-d the header file that defines the QWebFrame class.


how to solve this problem.

Add the proper #include statement to your cpp file.