Linker errors creating QLabel with doubleclick event - c++

I'm creating a QLabel subclass which adds the DoubleClickEvent to it. I have created the following, but I'm getting some strange linker errors, maybe someone can point out what I've done wrong?
//Header
#ifndef IMAGE_LABEL_H
#define IMAGE_LABEL_H
#include <QLabel>
#include <QMouseEvent>
class image_label : public QLabel
{
Q_OBJECT
public:
image_label(QWidget* parent = 0);
~image_label();
signals:
void doubleClicked();
protected:
void mouseDoubleClickEvent(QMouseEvent * e);
};
#endif
//CPP
#include "image_label.h"
#include <QMouseEvent>
image_label::image_label(QWidget* parent) : QLabel(parent)
{
}
image_label::~image_label()
{
}
void image_label::mouseDoubleClickEvent(QMouseEvent* e)
{
if (e->button() == Qt::LeftButton)
{
emit doubleClicked();
QLabel::mouseDoubleClickEvent(e);
}
}
I get the following linker errors when I compile:
image_label.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall image_label::metaObject(void)const " (?metaObject#image_label##UBEPBUQMetaObject##XZ)
image_label.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall image_label::qt_metacast(char const *)" (?qt_metacast#image_label##UAEPAXPBD#Z)
image_label.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall image_label::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#image_label##UAEHW4Call#QMetaObject##HPAPAX#Z)
image_label.obj : error LNK2019: unresolved external symbol "protected: void __thiscall image_label::doubleClicked(void)" (?doubleClicked#image_label##IAEXXZ) referenced in function "protected: virtual void __thiscall image_label::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent#image_label##MAEXPAVQMouseEvent###Z)
Can anybody help why I get these errors?

You must run the MOC preprocessor on the file image_label.h. This generates a file moc_image_label.cppthat you must include in the build. The error message indicates that you have not done this. (The symbols image_label::metaObject etc. that are mentioned in the error message are defined in moc_image_label.cpp.)

Related

Linking error when subclassing QChartView

I tried to override the mouseMoveEvent method by subclassing ChartView and I get a linking error which has something to do with the constructor of ChartView class.
class ChartView : public QChartView
{
Q_OBJECT
public:
ChartView(QChart* chart, QWidget* parent = 0);
protected:
void mouseMoveEvent(QMouseEvent* event) override;
};
ChartView::ChartView(QChart* chart, QWidget* parent)
: QChartView(chart, parent)
{
this->setMouseTracking(true);
}
void ChartView::mouseMoveEvent(QMouseEvent* event)
{
qDebug() << event->pos();
}
The error:
1>mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __cdecl ChartView::metaObject(void)const " (?metaObject#ChartView##UEBAPEBUQMetaObject##XZ)
1>mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual void * __cdecl ChartView::qt_metacast(char const *)" (?qt_metacast#ChartView##UEAAPEAXPEBD#Z)
1>mainwindow.obj : error LNK2001: unresolved external symbol "public: virtual int __cdecl ChartView::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#ChartView##UEAAHW4Call#QMetaObject##HPEAPEAX#Z)
When I remove the constructor of ChartView, the problem is gone, but I dont know why, because I also dont understand the error.
What am I doing wrong and how can I fix this problem?
Before building your application, you need to clean qmake and run it again. Then, you can rebuild the solution. Problem is fixed.

VS2013 with QT5.3.2 using Websocket and got a unresolved external symbol issue

I got a problem with VS2013 and QT5.3.2.
when I am using Websocket, it says unresolved external symbol with QWebSocket::sendTextMessage and other websocket functions.
I have already #include <QtWebSockets/QWebSocket> and set the QT Project Setting and checked WebKit and Network Module.
This is the full error message I have got:
1>mainwindow.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QWebSocket::~QWebSocket(void)" (__imp_??1QWebSocket##UAE#XZ),referenced in function "public: virtual __thiscall MWebSocket::~MWebSocket(void)" (??1MWebSocket##UAE#XZ)
1>MWebSocket.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QWebSocket::~QWebSocket(void)" (__imp_??1QWebSocket##UAE#XZ)
1>MWebSocket.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QWebSocket::QWebSocket(class QString const &,enum QWebSocketProtocol::Version,class QObject *)" (__imp_??0QWebSocket##QAE#ABVQString##W4Version#QWebSocketProtocol##PAVQObject###Z),referenced in function "public: __thiscall MWebSocket::MWebSocket(class QUrl const &,class QObject *)" (??0MWebSocket##QAE#ABVQUrl##PAVQObject###Z)
1>MWebSocket.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __int64 __thiscall QWebSocket::sendTextMessage(class QString const &)" (__imp_?sendTextMessage#QWebSocket##QAE_JABVQString###Z),referenced in function "private: void __thiscall MWebSocket::onConnected(void)" (?onConnected#MWebSocket##AAEXXZ)
1>MWebSocket.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebSocket::close(enum QWebSocketProtocol::CloseCode,class QString const &)" (__imp_?close#QWebSocket##QAEXW4CloseCode#QWebSocketProtocol##ABVQString###Z),referenced in function "private: void __thiscall MWebSocket::onTextMessageReceived(class QString)" (?onTextMessageReceived#MWebSocket##AAEXVQString###Z)
1>MWebSocket.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebSocket::open(class QUrl const &)" (__imp_?open#QWebSocket##QAEXABVQUrl###Z),referenced in function "public: __thiscall MWebSocket::MWebSocket(class QUrl const &,class QObject *)" (??0MWebSocket##QAE#ABVQUrl##PAVQObject###Z)
1>MWebSocket.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebSocket::connected(void)" (__imp_?connected#QWebSocket##QAEXXZ),referenced in function "public: __thiscall MWebSocket::MWebSocket(class QUrl const &,class QObject *)" (??0MWebSocket##QAE#ABVQUrl##PAVQObject###Z)
1>MWebSocket.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebSocket::disconnected(void)" (__imp_?disconnected#QWebSocket##QAEXXZ),referenced in function "public: __thiscall MWebSocket::MWebSocket(class QUrl const &,class QObject *)" (??0MWebSocket##QAE#ABVQUrl##PAVQObject###Z)
1>MWebSocket.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebSocket::textMessageReceived(class QString const &)" (__imp_?textMessageReceived#QWebSocket##QAEXABVQString###Z),referenced in function "private: void __thiscall MWebSocket::onConnected(void)" (?onConnected#MWebSocket##AAEXXZ)
1>MWebSocket.obj : error LNK2001: unresolved external symbol "__declspec(dllimport) public: static struct QMetaObject const QWebSocket::staticMetaObject" (__imp_?staticMetaObject#QWebSocket##2UQMetaObject##B)
1>debug/\MapleUI.exe : fatal error LNK1120: 9 unresolved externals
This is the code for Websocket:
//HEADER
#pragma once
#include "global.h"
class MWebSocket : public QObject
{
Q_OBJECT
public:
explicit MWebSocket(const QUrl &url, QObject *parent = Q_NULLPTR);
Q_SIGNALS:
void closed();
private Q_SLOTS:
void onConnected();
void onTextMessageReceived(QString message);
private:
QWebSocket m_webSocket;
QUrl m_url;
};
//CPP
#include "global.h"
#include "MWebSocket.h"
QT_USE_NAMESPACE
//! [constructor]
MWebSocket::MWebSocket(const QUrl &url, QObject *parent) :
QObject(parent),
m_url(url)
{
connect(&m_webSocket, &QWebSocket::connected, this, &MWebSocket::onConnected);
connect(&m_webSocket, &QWebSocket::disconnected, this, &MWebSocket::closed);
m_webSocket.open(QUrl(url));
}
//! [constructor]
//! [onConnected]
void MWebSocket::onConnected()
{
qDebug() << "WebSocket connected";
connect(&m_webSocket, &QWebSocket::textMessageReceived,
this, &MWebSocket::onTextMessageReceived);
m_webSocket.sendTextMessage(QStringLiteral("H2ello, world!"));
}
//! [onConnected]
//! [onTextMessageReceived]
void MWebSocket::onTextMessageReceived(QString message)
{
qDebug() << "Message received:" << message;
m_webSocket.close();
}
//! [onTextMessageReceived]
How can I solve this problem?
Just find out that add Qt5WebSocketsd.lib to the project will fix the problem. I dont know why this need to be manually, cuz before when I using other libs QT5 plugin will add them automate
According to the manual:
Header: #include <QWebSocketServer>
qmake: QT += websockets
Since: Qt 5.3
Inherits: QObject

LNK2019 (Unresolved external symbol) When Compiling with MSVC2013

Im working on a project using Qt/C++ originally compiled with MinGW64 (gcc 4.8). I decided to "port" it to MSVC2013, since I need to use some Windows API functions that doesn't work well in MinGW, but right now I'm stuck at this error:
mainwindow.obj:-1: error: LNK2019: unresolved external symbol "public: void __cdecl IMLoginView::clearFieldPass(void)" (?clearFieldPass#IMLoginView##QEAAXXZ) referenced in function "public: void __cdecl MainWindow::showConnectionErrorDialog(void)" (?showConnectionErrorDialog#MainWindow##QEAAXXZ)
imingestinglist.obj:-1: error: LNK2019: unresolved external symbol "public: static class QString __cdecl IMStorageSystem::getLogDir(void)" (?getLogDir#IMStorageSystem##SA?AVQString##XZ) referenced in function "private: class QList<int> __cdecl IMIngestingList::loadList(void)" (?loadList#IMIngestingList##AEAA?AV?$QList#H##XZ)
moc_imloginview.obj:-1: error: LNK2019: unresolved external symbol "public: void __cdecl IMLoginView::login(void)" (?login#IMLoginView##QEAAXXZ) referenced in function "private: static void __cdecl IMLoginView::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#IMLoginView##CAXPEAVQObject##W4Call#QMetaObject##HPEAPEAX#Z)
moc_imloginview.obj:-1: error: LNK2019: unresolved external symbol "public: void __cdecl IMLoginView::handleError(enum ALFRED_ACCESS_ERROR)" (?handleError#IMLoginView##QEAAXW4ALFRED_ACCESS_ERROR###Z) referenced in function "private: static void __cdecl IMLoginView::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)" (?qt_static_metacall#IMLoginView##CAXPEAVQObject##W4Call#QMetaObject##HPEAPEAX#Z)
moc_imloginview.obj:-1: error: LNK2019: unresolved external symbol "public: void __cdecl IMLoginView::userDisconnected(void)" (?userDisconnected#IMLoginView##QEAAXXZ) referenced in function "private: static void __cdecl IMLoginView::qt_static_metacall(class QObject *,enum QMetaObject::Call,int,void * *)"
The problem is: These methods aren't part of some external library, but part of the project itself. And I already triple checked that they are implemented. They aren't part of any template class either, but normal classes, and the log says the cpp files are being compiled. The same project links just fine with MinGW64.
I'm currently using Qt Creator 3.3.2 and QT 5.3.2.
What can be happening?
EDIT:
I Can't show much code, since its a closed-source project, but I can at least show the header and implementation layout of the methods:
imloginview.h:
class IMLoginView : public QWidget
{
Q_OBJECT
public:
explicit IMLoginView(QWidget *parent = 0);
void clearFieldPass();
~IMLoginView();
private:
//Lots of attributes
void configureComponents();
void keyPressEvent(QKeyEvent *event);
signals:
public slots:
void login();
void handleError(ALFRED_ACCESS_ERROR error);
void userDisconnected();
}
imloginview.cpp:
IMLoginView::IMLoginView(QWidget *parent) : //lots of initializations here
{
//Implementation
}
IMLoginView::~IMLoginView()
{
}
void IMLoginView::clearFieldPass()
{
//implementation
}
void IMLoginView::configureComponents()
{
//Implementation
}
void IMLoginView::keyPressEvent(QKeyEvent *event)
{
//implementation
}
void IMLoginView::login()
{
//implementation
}
void IMLoginView::handleError(ALFRED_ACCESS_ERROR error)
{
//implementation
}
void IMLoginView::userDisconnected()
{
//implementation
}
I'm sorry I really can't provide the actual method code, but its closed-source. =/

Linker error : error LNK2019: unresolved external symbol

I'm new to C++ and have encountered a problem while running my app. I googled the problem but since most results were with linking libraries I started a new thread.
I have a class CResizableDialog which I'm inheriting from my VtkDialogTest2 dialog class.
VtkDialogTest2.h;
#pragma once
#include "CResizableDialog.h"
#ifdef _WIN32_WCE
#error "CDHtmlDialog is not supported for Windows CE."
#endif
// VtkDialogTest2 dialog
class VtkDialogTest2 : public CResizableDialog
{
DECLARE_DYNCREATE(VtkDialogTest2)
public:
VtkDialogTest2(CWnd* pParent = NULL); // standard constructor
virtual ~VtkDialogTest2();
// Overrides
HRESULT OnButtonOK(IHTMLElement *pElement);
HRESULT OnButtonCancel(IHTMLElement *pElement);
// Dialog Data
enum { IDD = IDD_DIALOG4 };
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
virtual BOOL OnInitDialog();
DECLARE_MESSAGE_MAP()
public:
afx_msg void OnBnClickedOk();
};
VtkDialogTest2.cpp
#include "stdafx.h"
#include "Geometry.h"
#include "VtkDialogTest2.h"
IMPLEMENT_DYNCREATE(VtkDialogTest2, CResizableDialog)
VtkDialogTest2::VtkDialogTest2(CWnd* pParent /*=NULL*/)
: CResizableDialog(VtkDialogTest2::IDD, pParent),
{
}
VtkDialogTest2::~VtkDialogTest2()
{
}
void VtkDialogTest2::DoDataExchange(CDataExchange* pDX)
{
CResizableDialog::DoDataExchange(pDX);
}
BOOL VtkDialogTest2::OnInitDialog()
{
CResizableDialog::OnInitDialog();
//some code
return TRUE; // return TRUE unless you set the focus to a control
}
BEGIN_MESSAGE_MAP(VtkDialogTest2, CResizableDialog)
ON_BN_CLICKED(IDOK, &VtkDialogTest2::OnBnClickedOk)
END_MESSAGE_MAP()
//some code
I can't figure out what I'm doing wrong. I downloaded an example from the web which uses the CResizableDialog.h class the exact same way and copied both CResizableDialog.h and CResizableDialog.cpp into my project.
The errors I'm getting are;
1>VtkDialogTest2.obj : error LNK2019: unresolved external symbol "public: __thiscall CResizableDialog::CResizableDialog(unsigned int,class CWnd *)" (??0CResizableDialog##QAE#IPAVCWnd###Z) referenced in function "public: __thiscall VtkDialogTest2::VtkDialogTest2(class CWnd *)" (??0VtkDialogTest2##QAE#PAVCWnd###Z)
1>VtkDialogTest2.obj : error LNK2019: unresolved external symbol "protected: virtual int __thiscall CResizableDialog::OnInitDialog(void)" (?OnInitDialog#CResizableDialog##MAEHXZ) referenced in function "protected: virtual int __thiscall VtkDialogTest2::OnInitDialog(void)" (?OnInitDialog#VtkDialogTest2##MAEHXZ)
1>VtkDialogTest2.obj : error LNK2001: unresolved external symbol "protected: static struct AFX_MSGMAP const * __stdcall CResizableDialog::GetThisMessageMap(void)" (?GetThisMessageMap#CResizableDialog##KGPBUAFX_MSGMAP##XZ)
1>C:\Users\Geometry.exe : fatal error LNK1120: 3 unresolved externals
Any input will be highly appreciated.
The error was because I copied the CResizableDialog.h and CResizableDialog.cpp files directly into the project folder. I later noticed that they didn't show up in the solution window and copied them to the window as well. After that the errors disappeared.

C++/Qt - Open Dialog from MainWindow -Error LNK2019 - LNK2001: unresolved external symbol

basically the goal of the code is to open a dialog that contain a QWebView (with some content) after a botton is clicked
these is what i did:
mainwindow.h:
class MainWindow : public QMainWindow, public Ui::MainWindowUi
{
...
private slots:
void on_ViewDatabase_clicked();
...
}
mainwindow.cpp:
#include "mainwindow.h"
#include "onlinedb.h"
void MainWindow::on_ViewDatabase_clicked()
{
OnlineDB dlg(this);
dlg.exec();
}
onlinedb.h:
#ifndef OnlineDB_H
#define OnlineDB_H
#include "ui_onlinedb.h"
#include <QDialog>
class MainWindow;
class OnlineDB : public QDialog, public Ui::OnlineDB
{
Q_OBJECT
public:
OnlineDB(LkMainWindow *parent);
~OnlineDB();
private:
MainWindow *MainWindow;
};
#endif
onlinedb.cpp:
#include "onlinedb.h"
#include "mainwindow.h"
///////////////////////////////////////////////////////////////////////////////
//
// OnlineDB class constructor
//
// Create a OnlineDB
//
OnlineDB::OnlineDB(MainWindow *parent) : QDialog(parent), MainWindow(parent)
{
setupUi(this);
QUrl url("http://google.com"); //whatever
webView->load(url);
}
///////////////////////////////////////////////////////////////////////////////
//
// OnlineDB class destructor
//
// Clean up the OnlineDB
//
OnlineDB::~OnlineDB()
{
}
I got several linking errors
Plz can someone help on that?
3>Linking...
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebView::load(class QUrl const &)" (__imp_?load#QWebView##QAEXABVQUrl###Z) referenced in function "public: __thiscall OnlineDB::OnlineDB(class LkMainWindow *)" (??0OnlineDB##QAE#PAVLkMainWindow###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall OnlineDB::metaObject(void)const " (?metaObject#OnlineDB##UBEPBUQMetaObject##XZ)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall OnlineDB::qt_metacast(char const *)" (?qt_metacast#OnlineDB##UAEPAXPBD#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall OnlineDB::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#OnlineDB##UAEHW4Call#QMetaObject##HPAPAX#Z)
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall QWebView::setUrl(class QUrl const &)" (__imp_?setUrl#QWebView##QAEXABVQUrl###Z) referenced in function "public: void __thiscall Ui_OnlineDB::setupUi(class QDialog *)" (?setupUi#Ui_OnlineDB##QAEXPAVQDialog###Z)
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall QWebView::QWebView(class QWidget *)" (__imp_??0QWebView##QAE#PAVQWidget###Z) referenced in function "public: void __thiscall Ui_OnlineDB::setupUi(class QDialog *)" (?setupUi#Ui_OnlineDB##QAEXPAVQDialog###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual struct QMetaObject const * __thiscall QWebView::metaObject(void)const " (?metaObject#QWebView##UBEPBUQMetaObject##XZ)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual void * __thiscall QWebView::qt_metacast(char const *)" (?qt_metacast#QWebView##UAEPAXPBD#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual int __thiscall QWebView::qt_metacall(enum QMetaObject::Call,int,void * *)" (?qt_metacall#QWebView##UAEHW4Call#QMetaObject##HPAPAX#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall QWebView::event(class QEvent *)" (?event#QWebView##UAE_NPAVQEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual class QSize __thiscall QWebView::sizeHint(void)const " (?sizeHint#QWebView##UBE?AVQSize##XZ)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mousePressEvent(class QMouseEvent *)" (?mousePressEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mouseReleaseEvent(class QMouseEvent *)" (?mouseReleaseEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mouseDoubleClickEvent(class QMouseEvent *)" (?mouseDoubleClickEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::mouseMoveEvent(class QMouseEvent *)" (?mouseMoveEvent#QWebView##MAEXPAVQMouseEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::wheelEvent(class QWheelEvent *)" (?wheelEvent#QWebView##MAEXPAVQWheelEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::keyPressEvent(class QKeyEvent *)" (?keyPressEvent#QWebView##MAEXPAVQKeyEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::keyReleaseEvent(class QKeyEvent *)" (?keyReleaseEvent#QWebView##MAEXPAVQKeyEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::focusInEvent(class QFocusEvent *)" (?focusInEvent#QWebView##MAEXPAVQFocusEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::focusOutEvent(class QFocusEvent *)" (?focusOutEvent#QWebView##MAEXPAVQFocusEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::paintEvent(class QPaintEvent *)" (?paintEvent#QWebView##MAEXPAVQPaintEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::resizeEvent(class QResizeEvent *)" (?resizeEvent#QWebView##MAEXPAVQResizeEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::contextMenuEvent(class QContextMenuEvent *)" (?contextMenuEvent#QWebView##MAEXPAVQContextMenuEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dragEnterEvent(class QDragEnterEvent *)" (?dragEnterEvent#QWebView##MAEXPAVQDragEnterEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dragMoveEvent(class QDragMoveEvent *)" (?dragMoveEvent#QWebView##MAEXPAVQDragMoveEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dragLeaveEvent(class QDragLeaveEvent *)" (?dragLeaveEvent#QWebView##MAEXPAVQDragLeaveEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::dropEvent(class QDropEvent *)" (?dropEvent#QWebView##MAEXPAVQDropEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::changeEvent(class QEvent *)" (?changeEvent#QWebView##MAEXPAVQEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual void __thiscall QWebView::inputMethodEvent(class QInputMethodEvent *)" (?inputMethodEvent#QWebView##MAEXPAVQInputMethodEvent###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "public: virtual class QVariant __thiscall QWebView::inputMethodQuery(enum Qt::InputMethodQuery)const " (?inputMethodQuery#QWebView##UBE?AVQVariant##W4InputMethodQuery#Qt###Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual bool __thiscall QWebView::focusNextPrevChild(bool)" (?focusNextPrevChild#QWebView##MAE_N_N#Z)
3>onlinedb.obj : error LNK2001: unresolved external symbol "protected: virtual class QWebView * __thiscall QWebView::createWindow(enum QWebPage::WebWindowType)" (?createWindow#QWebView##MAEPAV1#W4WebWindowType#QWebPage###Z)
3>onlinedb.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall QWebView::~QWebView(void)" (__imp_??1QWebView##UAE#XZ) referenced in function "public: virtual void * __thiscall QWebView::`scalar deleting destructor'(unsigned int)" (??_GQWebView##UAEPAXI#Z)
unresolved external symbol "public: virtual int __thiscall OnlineDB::qt_metacall(enum QMetaObject::Call,int,void * *)
You have not moc'd your OnlineDB or you have not linked the objectfile.
error LNK2019: unresolved external symbol "__declspec(dllimport) public: void _thiscall QWebView::load(class QUrl const &)"
You have not linked against all the necessary Qt libraries. QWebView is in the QtWebKit library.