Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
QGraphicsViewを右クリックしながらQtでポップアップメニューを表示するにはどうすればよいですか?助けてください
QGraphicsViewはから派生してQWidgetいるので、再実装contextMenuEvent(QContextMenuEvent* event)して。を生成しQMenuます。ビューを右クリックしたときに表示する場合QGraphicsItems は、アイテムを再実装する必要がcontextMenuEvent(QGraphicsSceneContextMenuEvent* event)あります。
QGraphicsView
QWidget
contextMenuEvent(QContextMenuEvent* event)
QMenu
QGraphicsItems
contextMenuEvent(QGraphicsSceneContextMenuEvent* event)