itemAt not returning custom qGraphicsItem

后端 未结 1 1528
盖世英雄少女心
盖世英雄少女心 2021-01-14 09:51

I have a custom implementation of qGraphicsScene and a custom qGraphicsItem that I click on, but the itemAt function never returns a value, even though I am fairly certain t

相关标签:
1条回答
  • 2021-01-14 10:14

    You are querying the scene in item coordinates instead of scene coordinates. Use:

    ...
    QGraphicsItem *mod = itemAt(event->scenePos());
    ...
    
    0 讨论(0)
提交回复
热议问题