Results 1 to 3 of 3

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2007
    Posts
    13
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

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

    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

  2. #2
    Join Date
    Jan 2006
    Location
    Munich, Germany
    Posts
    4,714
    Thanks
    21
    Thanked 418 Times in 411 Posts
    Qt products
    Qt3 Qt4 Qt5 Qt/Embedded
    Platforms
    Unix/X11 Windows

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

    and in compiling it under XP I get no errors.
    That is what I don't get.

    You should declare a variable:
    Qt Code:
    1. QColor greenColor(Qt::green);
    To copy to clipboard, switch view to plain text mode 
    ==========================signature=============== ==================
    S.O.L.I.D principles (use them!):
    https://en.wikipedia.org/wiki/SOLID_...iented_design)

    Do you write clean code? - if you are TDD'ing then maybe, if not, your not writing clean code.

  3. #3
    Join Date
    Oct 2007
    Posts
    13
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

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

    I don't get it either. Should have been flagged in XP also...

    Hugo

Similar Threads

  1. Qtopia cross-compile for arm
    By Bitz in forum Qt for Embedded and Mobile
    Replies: 2
    Last Post: 12th June 2006, 12:11

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Qt is a trademark of The Qt Company.