Been using QT for a couple weeks now, but I'm only needing to use two classes at this time QPainter, and QImage. However on the destruction of a QPainter instance, I'm getting an exception from the DLL.
//Here is a snippet of the header code:
#include <Windows.h>
#include <QT/qpainter.h>
#include <QT/qimage.h>
class QTWrapper
public:
QTWrapper();
virtual ~QTWrapper();
private:
};
//Here is a snippet of the header code:
#include <Windows.h>
#include <QT/qpainter.h>
#include <QT/qimage.h>
class QTWrapper
public:
QTWrapper();
virtual ~QTWrapper();
private:
QImage qImage;
QPainter qPaint;
};
To copy to clipboard, switch view to plain text mode
//sample of source file
QTWrapper::QTWrapper( )
{
qPaint.begin(&qImage);
}
QTWrapper::~QTWrapper()
{
}
//sample of source file
QTWrapper::QTWrapper( )
{
qImage = QImage(0, 0);
qPaint.begin(&qImage);
}
QTWrapper::~QTWrapper()
{
}
To copy to clipboard, switch view to plain text mode
So on the destructions of QTWrapper, I get an unhandled exception from the QPainter class in QtGui4d.dll. Any ideas?
Bookmarks