Results 1 to 5 of 5

Thread: Calling setPos() on custom QGraphicsPixmapItem doesn't update item in GraphicsScene

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Apr 2020
    Posts
    7
    Thanks
    1
    Qt products
    Qt5

    Default Re: Calling setPos() on custom QGraphicsPixmapItem doesn't update item in GraphicsSce

    Quote Originally Posted by d_stranz View Post
    Set the QGraphicsItem::ItemSendsGeometryChanges flag on your card items.
    I did that already in the constructor, should it be somewhere else?

  2. #2
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,315
    Thanks
    314
    Thanked 870 Times in 857 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: Calling setPos() on custom QGraphicsPixmapItem doesn't update item in GraphicsSce

    Hmmm, maybe that flag only applies when the ItemIsMovable flag is also set and the user interactively drags the item.

    I don't think there is any alternative to the QGraphicsScene::update() call.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

Similar Threads

  1. Replies: 7
    Last Post: 31st October 2010, 12:21
  2. QCursor::setPos() - doesn't work
    By Piskvorkar in forum Qt Programming
    Replies: 0
    Last Post: 21st March 2010, 13:24
  3. GraphicsView/GraphicsScene does not update
    By robicjedi in forum Qt Programming
    Replies: 5
    Last Post: 2nd February 2010, 23:33
  4. Replies: 1
    Last Post: 26th August 2009, 15:47
  5. How to move an item on a GraphicsScene
    By Holy in forum Qt Programming
    Replies: 17
    Last Post: 25th July 2008, 14:40

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.