Hi there

I have QGraphicsRectItem and I want to resize it , but I can't.

I tried this , but it doesnt work
Qt Code:
  1. QRectF rect ( player->shape()->pos().x() ,
  2. (player->shape()->pos().y()+WINDOW_END_H)/2.0,
  3. PLAYER_WIDTH_P,
  4. PLAYER_HEIGHT_P/2.0);
  5.  
  6. player->shape()->setRect(rect);
To copy to clipboard, switch view to plain text mode 

player->shape() returns a QGraphicsRectItem *

I just want to change the hight of the rect to a half .

I tried this , too
Qt Code:
  1. player->shape()->rect().setHeight(player->shape()->rect().height() / 2.0 );
To copy to clipboard, switch view to plain text mode 

It doesnt work too .

Do you know what is the problem?