Hello all!

I am trying to resize a QGraphicsItem when I resize the app window but its not working.
How could I do that?
Qt Code:
  1. //Tool Box 3
  2. QGridLayout *gridLayoutInvestimento5 = new QGridLayout(boxInvestimento3);
  3. QGraphicsView *graphicsViewFluxoCaixa = new QGraphicsView(boxInvestimento3);
  4. QGraphicsScene *graphicsSceneFluxoCaixa = new QGraphicsScene(graphicsViewFluxoCaixa);
  5. graphicsViewFluxoCaixa->setScene(graphicsSceneFluxoCaixa);
  6.  
  7. boxInvestimento3->setLayout(gridLayoutInvestimento5);
  8. gridLayoutInvestimento5->addWidget(graphicsViewFluxoCaixa);
  9.  
  10. //graphicsViewFluxoCaixa->adjustSize();
  11.  
  12. //graphicsViewFluxoCaixa->setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Expanding);
  13.  
  14. //graphicsViewFluxoCaixa->fitInView(graphicsSceneFluxoCaixa->itemsBoundingRect(), Qt::IgnoreAspectRatio);
  15.  
  16. QPen caneta(Qt::black);
  17. caneta.setWidth(4);
  18. QGraphicsLineItem *linhaTempo = new QGraphicsLineItem(0,0,graphicsViewFluxoCaixa->width(),0);
  19.  
  20. linhaTempo->setPen(caneta);
  21. graphicsSceneFluxoCaixa->addItem(linhaTempo);
  22. graphicsViewFluxoCaixa->adjustSize();
  23. graphicsViewFluxoCaixa->setBackgroundBrush(QBrush(Qt::red));
To copy to clipboard, switch view to plain text mode 

Thanks a lot.