When I try to set the width of a modified QDockWidget

Qt Code:
  1. int iWidth = 500;
  2. this->geometry().setWidth(iWidth);
To copy to clipboard, switch view to plain text mode 

I get the following error.

passing 'cost QRect' as 'this' argument of 'void QRect::setWidth(int)' discards qualifier
I have no idea what that error means and why I can't use such a simple function.