Results 1 to 5 of 5

Thread: QGraphicsItem inheritence

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2009
    Posts
    17
    Thanks
    5
    Qt products
    Qt4
    Platforms
    Unix/X11

    Smile Re: QGraphicsItem inheritence

    SUCCESS!

    Yea, the runtime was defaulting to the Node implementation of shape(), which
    was an elipse around 0,0. Reiplemented shape() in CloudNode like:

    Qt Code:
    1. QPainterPath CloudNode::shape() const
    2. {
    3. path.addRect(0, 0, cloudimage->width(), cloudimage->height());
    4. return path;
    5. }
    To copy to clipboard, switch view to plain text mode 

    and I can now drag the pixmap from any point in the rectangle.

    Thanks again.
    -baj
    Last edited by wysota; 12th August 2009 at 00:48. Reason: missing [code] tags

Similar Threads

  1. Replies: 2
    Last Post: 25th March 2011, 09:18
  2. destruction of QGraphicsItem
    By killkolor in forum Qt Programming
    Replies: 2
    Last Post: 5th December 2009, 10:31
  3. Replies: 1
    Last Post: 25th February 2009, 00:34
  4. QGraphicsItem does not update
    By zgulser in forum Qt Programming
    Replies: 1
    Last Post: 5th February 2009, 14:44
  5. Snap-to grid on QGraphicsItem
    By hardgeus in forum Qt Programming
    Replies: 9
    Last Post: 28th April 2008, 16:22

Tags for this Thread

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.