Hi,

Yes I am fine with C++, but I am new to Qt. I have already tried what you suggest. I am dragging from a QListWidget derived class to a QGraphicsView derived class. In my code I have the following: -

Qt Code:
  1. class EdaSymbolListWidget : public QListWidget
  2. {
  3. protected:
  4. void startDrag(Qt::DropActions /*supportedActions*/)
  5. {
  6. QListWidgetItem *item = currentItem();
  7. QMimeData *mimeData = new QMimeData;
  8. ba = item->text().toLatin1().data();
  9. mimeData->setData("application/x-my-custom-item", ba);
  10. QDrag *drag = new QDrag(this);
  11. drag->setMimeData(mimeData);
  12.  
  13. drag->exec(Qt::MoveAction);
  14. }
  15.  
  16.  
  17. void keyPressEvent(QKeyEvent *key)
  18. {
  19. qDebug("EdaSymbolListWidget Key Event: %x", key->key());
  20.  
  21. QListWidget::keyPressEvent(key);
  22. }
  23.  
  24. };
To copy to clipboard, switch view to plain text mode 

I also have the following override in my QGraphicsView derived class


Qt Code:
  1. void MyGraphicsView::keyPressEvent(QKeyEvent *key)
  2. {
  3. qDebug("View Key Event: %x", key->key());
  4.  
  5. QGraphicsView::keyPressEvent(key);
  6. }
To copy to clipboard, switch view to plain text mode 

When I focus the list or view I get the key presses in the debug window as I would expect. However, once a start a drag operation from the QListWidget pressing keys no longer calls the keyPressEvent in either view, and thats where I am stuck

Gerry