PDA

View Full Version : QSvgWidget Compile error



jimiq
17th September 2009, 15:32
Hi,

I am using Qt4.5 and I keep getting a compile error of 'QSvgWidget was not declared in this scope' and points to this line

QSvgWidget *icon=new QSvgWidget(":/images/testImage.svg",this);

even though I have #include <QSvgWidget> at the top of the file.

What am I missing??????

Jim

jimiq
17th September 2009, 16:27
Hi,

I have managed to find the problem, you need to add the line

QT += svg

to the .pro file.

Jim