I added line edit, pushbutton,label to QGraphics View..

But the position of scene is mid of the QGraphicsView..

How do i change the the position of scene in QGraphics View..

I am trying with
Qt Code:
  1. QGraphicsScene *scene= new QGraphicsScene(this);
  2. ui->graphicsView->setScene(scene);
  3. ui->graphicsView->setCacheMode(QGraphicsView::CacheBackground);
  4. Ui_Form *m_ui = new Ui_Form;
  5. QWidget *wid = new QWidget;
  6. m_ui->setupUi(wid);
  7. QGraphicsProxyWidget *proxy = new QGraphicsProxyWidget;
  8. QLabel *label = new QLabel;
  9. label->setText("Hello World !!!");
  10. QPushButton *button = new QPushButton;
  11. button->setText("dfgdfgdsg");
  12. QLineEdit *line = new QLineEdit;
  13. line->setFocus();
  14. proxy =scene->addWidget(line);
  15. label->setScaledContents(true);
  16. proxy = scene->addWidget(button);
  17. proxy = scene->addWidget(label);
  18. scene->addRect(QRectF(0, 0, 5, 30))->setBrush(Qt::green);
  19. ui->graphicsView->setScene(scene);
To copy to clipboard, switch view to plain text mode 

Adavance Thanks

Yuvaraj R