PDA

View Full Version : Problem with QGraphicsSvgItem



drake1983
8th July 2007, 06:56
I got an error when I include QGraphicsSvgItem in my program:


error: QGraphicsSvgItem: No such file or directory



I have read Trolltech's Docs and they says that QGraphicsSvgItem class was introduced since Qt 4.2, I have Qt 4.2.3 installed.

My program look like this:


#include<QGraphicsSvgItem>
//
class SVGItem : public QGraphicsSvgItem
{

public:
SVGItem(const QString & fileName, QGraphicsItem * parent = 0);

};
#endif

drake1983
8th July 2007, 07:05
Well, I have found the problem reading a little more inside Qt Assistant.

It's necessary to add the following line to the .pro :

QT+= svg

Regards!!