Hi, I subclassed a QGraphicsProxyWidget and I can successfully add it to the scene. However, I cannot move it around, and it seems that no mouse events are triggered.

Here is my implementation:

proxy.h
Qt Code:
  1. class GENProxy : public QGraphicsProxyWidget
  2. {
  3. public:
  4. GraphicsItem *parent = 0, QGraphicsScene *scene = 0);
  5. protected:
  6. QVariant itemChange(GraphicsItemChange change, const QVariant &value);
  7. void mousePressEvent(QGraphicsSceneMouseEvent * event);
  8. .....
  9. }
To copy to clipboard, switch view to plain text mode 

proxy.cpp
Qt Code:
  1. #include "proxy.h"
  2. .....
  3. GENProxy::GENProxy(QGraphicsItem *parent, QGraphicsScene *scene) : QGraphicsProxyWidget(parent)
  4. {
  5. QGroupBox *groupBox = new QGroupBox("Contact Details");
  6. QLabel *numberLabel = new QLabel("Telephone number");
  7. QLineEdit *numberEdit = new QLineEdit;
  8. QFormLayout *layout = new QFormLayout;
  9. layout->addRow(numberLabel, numberEdit);
  10. groupBox->setLayout(layout);
  11. QGraphicsProxyWidget *w = scene->addWidget(groupBox);
  12. w->setFlag(QGraphicsItem::ItemIsMovable,true);
  13. w->setFlag(QGraphicsItem::ItemIsSelectable,true);
  14. w->setFlag(QGraphicsItem::ItemIsFocusable,true);
  15. w->setFocus();
  16. }
To copy to clipboard, switch view to plain text mode 

main.cpp
Qt Code:
  1. QGraphicsView *myView = new QGraphicsView(myScene);
  2. myView->setRenderHint(QPainter::Antialiasing);
  3. myView->setSceneRect(0, 0, 800, 800);
  4. myView->setBackgroundBrush(Qt::gray);
  5. QVBoxLayout* vlayout = new QVBoxLayout(mainClass.Interface.terraformTab);
  6. vlayout->addWidget(myView);
  7. GENProxy *a = new GENProxy(0, myScene);
To copy to clipboard, switch view to plain text mode 

As a matter of fact, the only signal showing activity is itemChange, but I can't set the focus or move the proxy around, and signals attached to the proxy embedded widgets aren't firing either (avoided to put those in the above code).
I followed also another thread here (http://www.qtcentre.org/threads/3191...g-widget-focus) but couldn't come up with a solution.
Thanks for any help.