I'm stuck with the following problem :
I have a scene with several QGraphicsItems-derived instances. I make a first selection, then I want to extend it using CTRL-key and rubber band. The problem is that QGraphicsView does not seem to support extended selection due to following code :
in qgraphicsview.cpp :
Qt Code:
{ // ... #ifndef QT_NO_RUBBERBAND if (d->sceneInteractionAllowed) { // Rubberbanding is only allowed in interactive mode. event->accept(); d->rubberBanding = true; if (d->scene) { // Initiating a rubber band always clears the selection. d->scene->clearSelection(); } } } else #endif // ... }To copy to clipboard, switch view to plain text mode
As you see, "Initiating a rubber band always clears the selection". So I tried to overload my scene's clearSelection() method to have my word on it, but unfortunately it's not a virtual method and thus it's not called.
I'd prefer a check at scene's level, not at item's level (indeed, i could check for QApplication::keyboardModifiers() in the itemChange() method of each item, but it's kinda intrusive)
Anybody faced the same problem ?
Thanks in advance for your answers
Bookmarks