Results 1 to 2 of 2

Thread: qgraphicsitem_cast problem

  1. #1
    Join Date
    Feb 2008
    Posts
    102
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Question qgraphicsitem_cast problem

    After compiling the code, i have this 3 error:

    moc_pixmapitem.cpp:40: error: ‘staticMetaObject’ is not a member of ‘QGraphicsPixmapItem’

    moc_pixmapitem.cpp:54: error: ‘qt_metacast’ is not a member of ‘QGraphicsPixmapItem’

    moc_pixmapitem.cpp:59: error: ‘qt_metacall’ is not a member of ‘QGraphicsPixmapItem’

    I have this error, when i inserted this line of code in my MainWIndow application:
    Qt Code:
    1. if(item->type() == pixmapItem::Type)
    2. qgraphicsitem_cast<pixmapItem *>(item);
    To copy to clipboard, switch view to plain text mode 

    I add to pixmapitem.h file:
    Qt Code:
    1. public:
    2. enum { Type = UserType + 2 };
    3. int type() const{return Type;}
    To copy to clipboard, switch view to plain text mode 

    What's wrong???

  2. #2
    Join Date
    Feb 2008
    Posts
    102
    Thanks
    3
    Qt products
    Qt4
    Platforms
    Unix/X11

    Talking Re: qgraphicsitem_cast problem

    I had a public slot function in pixmapItem class.....so i put this function in a public section(without slot) and so resolve the problem............

Similar Threads

  1. problem with paint and erase in frame
    By M.A.M in forum Qt Programming
    Replies: 9
    Last Post: 4th May 2008, 20:17
  2. Tricky problem with ARGB widget / UpdateLayeredWindow
    By nooky59 in forum Qt Programming
    Replies: 3
    Last Post: 21st February 2008, 10:35
  3. Graphics view display problem.
    By kiranraj in forum Qt Programming
    Replies: 3
    Last Post: 20th July 2007, 07:08
  4. Grid Layout Problem
    By Seema Rao in forum Qt Programming
    Replies: 2
    Last Post: 4th May 2006, 12:45
  5. Replies: 16
    Last Post: 7th March 2006, 15:57

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.