I am trying to do this (directDrawingPainterPath is a class member of type QPainterPath):
directDrawingPainterPath = QPainterPath(point);
However, compiling the program in visual studio gets me the following error:
1>ScribbleWidget.obj : error LNK2019: unresolved external symbol
“__declspec(dllimport) public: class QPainterPath & _cdecl
QPainterPath::operator=(class QPainterPath &&)”
(_imp_??4QPainterPath@@QEAAAEAV0@$$QEAV0@@Z) referenced in function
“protected: virtual void __cdecl ScribbleWidget::mousePressEvent(class
QMouseEvent *)”
(?mousePressEvent@ScribbleWidget@@MEAAXPEAVQMouseEvent@@@Z)
When I rewrite it like this:
QPainterPath tmp(point);
directDrawingPainterPath = tmp;
Then it works. This also happens for other assignments:
This works:
QString tmp = att.value().toString();
name = tmp;
This doesn’t:
name = att.value().toString();
Anyone knows what the problem could be?
Update
I just found the solution: The problem was that I tried to link against a QT that was compiled with VS2008, while I compiled the project with VS2010.
Using a QT that’s also compiled with VS2010 makes everything work…
I just found the solution: The problem was that I tried to link against a QT that was compiled with VS2008, while I compiled the project with VS2010.
Using a QT that’s also compiled with VS2010 makes everything work…