Results 1 to 2 of 2

Thread: invalid use of incomplete type 'class QWebFrame'

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Jun 2014
    Posts
    48
    Thanks
    6
    Qt products
    Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

    Default invalid use of incomplete type 'class QWebFrame'

    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 :-
    Qt Code:
    1. QString video_dailymotion::getQualityUrl(QString json, QString quality)
    2. {
    3. QWebView* view = new QWebView();
    4. view->setHtml("<script>function data() {return " + json + ";}</script>");
    5. QString result = view->page()->mainFrame()->evaluateJavaScript("data().metadata.qualities['" + quality + "'][0].url").toString();
    6.  
    7. view->deleteLater();
    8. return result;
    9. }
    To copy to clipboard, switch view to plain text mode 
    error :-
    Qt Code:
    1. /opt/software/clipgrab-3.5.6/video_dailymotion.cpp:120: error: invalid use of incomplete type 'class QWebFrame'
    2. result = view->page()->mainFrame()->evaluateJavaScript("data().metadata.qualities['" + quality + "'][0].url").toString();
    To copy to clipboard, switch view to plain text mode 
    how to solve this problem. why having this problem.

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,321
    Thanks
    316
    Thanked 871 Times in 858 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: invalid use of incomplete type 'class QWebFrame'

    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.

Similar Threads

  1. invalid use of incomplete type 'struct MSG'
    By libed in forum Qt Programming
    Replies: 5
    Last Post: 21st February 2019, 12:32
  2. Replies: 1
    Last Post: 18th July 2014, 13:38
  3. Replies: 2
    Last Post: 13th October 2012, 16:58
  4. Replies: 9
    Last Post: 29th August 2010, 14:30
  5. error: invalid use of incomplete type 'struct QMetaEnum'
    By dyngoman in forum Qt Programming
    Replies: 3
    Last Post: 12th March 2010, 13:38

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.