PDA

View Full Version : invalid use of qualified-name 'Qt::green'



hugo vanwoerkom
21st October 2007, 13:32
Hi,

In compiling code code on qt4 I have:

...
#include <QColor>

void GRAPHIC::invest_panl(void)
{
char name[32]="invest_panl";
int i,j=0,k,m,odd,xold,xnew,savex;
int ph=0,pv=0;
int wih = get_int("wih");
QPainterPath path; //HVW-Qt4

QPen redpen;
QPen bluepen;
QPen greenpen;

QColor Qt::green;
...

and in compiling it under XP I get no errors. But in compiling it on Linux I get:

invalid use of qualified-name 'Qt::green'

which I don't get. Anybody give me a clue? Thanks!

Hugo

high_flyer
21st October 2007, 13:37
and in compiling it under XP I get no errors.
That is what I don't get.

You should declare a variable:

QColor greenColor(Qt::green);

hugo vanwoerkom
21st October 2007, 14:35
I don't get it either. Should have been flagged in XP also...

Hugo