Quote Originally Posted by jpn View Post
Another way could be to install an event filter on the application object:
Qt Code:
  1. class MyTextItem : public QGraphicsTextItem // QGraphicsTextItem inherits QObject
  2. {
  3. Q_OBJECT
  4. ...
  5.  
  6. public:
  7. bool eventFilter(QObject* object, QEvent* event)
  8. {
  9. if (event->type() == QEvent::Shortcut ||
  10. event->type() == QEvent::ShortcutOverride)
  11. {
  12. if (!object->inherits("QGraphicsView"))
  13. {
  14. event->accept();
  15. return true;
  16. }
  17. }
  18. return false;
  19. }
  20.  
  21. protected:
  22. void focusInEvent(QFocusEvent* event) {
  23. QGraphicsTextItem::focusInEvent(event);
  24. qApp->installEventFilter(this);
  25. }
  26.  
  27. void focusOutEvent(QFocusEvent* event) {
  28. QGraphicsTextItem::focusOutEvent(event);
  29. qApp->removeEventFilter(this);
  30. }
  31. };
To copy to clipboard, switch view to plain text mode 
Hey that works like a charm. Thanks a lot!