PDA

View Full Version : Strange behavior using context menu and RubberBandDrag in QGraphicsview



salcin
22nd October 2013, 21:19
Hi,
I have attached a modified version of the 40000 chip example. In the Chip class I've implemented the contextMenuEvent(...) method to create a context menu when right clicking a chip. I'm using Qt 5.1.1. When a rubber band drag (selection) is made while the context menu is displayed all the selected chips is moved.

Steps to reproduce:
Compile an run the application.
Right click on a chip, don't select anything in the context menu.
While the context menu is displayed start a rubber band drag by click and hold on the white area between the chips. Start the drag see how all chips are moved to a random position.

Have I made a mistake when creating the context menu or is this a bug QT?

Thanks!