#include <QtGui>int main(int argc, char *argv[]){ QApplication a(argc, argv); QGraphicsScene scene(QRectF(-100, -100, 300, 300)); QGraphicsView view(&scene); QGraphicsRectItem* rectItem = new QGraphicsRectItem(0, &scene); rectItem->setPen(QPen(Qt::black)); rectItem->setBrush(QBrush(Qt::green)); rectItem->setRect(QRectF(-30, -30, 120, 80)); rectItem->setFlags(QGraphicsItem::ItemIsMovable); QTextEdit* text = new QTextEdit(); text->setFixedSize(100,30); text->setGeometry(-40,-70,100,30); QGraphicsProxyWidget* widgetItem = scene.addWidget(text); //widgetItem->setFlags(QGraphicsItem::ItemIsMovable); //вот так не работает.. view.show(); return a.exec();}