Results 1 to 3 of 3

Thread: QWebView undefined references

  1. #1
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default QWebView undefined references

    Hello,
    I am trying to use the QWebView class to display html pages.
    But I am unable to compile. I am using the following code:
    Qt Code:
    1. #include <QWebView>
    2. MainWindow::MainWindow()
    3. {
    4. QWebView *view = new QWebView(this);
    5. view->load(QUrl("http://www.trolltech.com/"));
    6. view->show();
    7. Setup(this);
    8. }
    To copy to clipboard, switch view to plain text mode 
    I then added to "INCPATH " -I"n:\Qt\4.4.0\include\QtWebKit"
    and to the lib: -QtWebKit4

    But i keep getting the following error:

    release/mainwindow.o(.text+0x34c4):mainwindow.cpp: undefined reference to `_imp_
    __ZN8QWebViewC1EP7QWidget'
    release/mainwindow.o(.text+0x3527):mainwindow.cpp: undefined reference to `_imp_
    __ZN8QWebView4loadERK4QUrl'
    release/mainwindow.o(.text+0x36f4):mainwindow.cpp: undefined reference to `_imp_
    __ZN8QWebViewC1EP7QWidget'
    release/mainwindow.o(.text+0x3757):mainwindow.cpp: undefined reference to `_imp_
    __ZN8QWebView4loadERK4QUrl'
    Any help would be appriciated.
    Thanks in advance.
    -xtreme

  2. #2
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: QWebView undefined references

    Quote Originally Posted by xtreme View Post
    I then added to "INCPATH " -I"n:\Qt\4.4.0\include\QtWebKit"
    and to the lib: -QtWebKit4
    Just add "QT += webkit" to the .pro file.
    J-P Nurmi

  3. The following user says thank you to jpn for this useful post:

    xtreme (5th August 2008)

  4. #3
    Join Date
    Jul 2008
    Posts
    7
    Thanks
    2
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QWebView undefined references

    Thanks, it works.

Similar Threads

  1. QPSQL problem
    By LoneWolf in forum Installation and Deployment
    Replies: 60
    Last Post: 4th November 2009, 14:22
  2. how to add static library into qmake
    By Namrata in forum Qt Tools
    Replies: 1
    Last Post: 20th November 2007, 17:33
  3. MS Sql native driver??
    By LordQt in forum Qt Programming
    Replies: 4
    Last Post: 9th October 2007, 13:41
  4. error undefined reference ...............
    By amit_pansuria in forum Qt Programming
    Replies: 2
    Last Post: 8th June 2007, 14:28
  5. how to correctly compile threads support?
    By srhlefty in forum Installation and Deployment
    Replies: 9
    Last Post: 25th June 2006, 19:15

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.