Check the signature of QPixmap::scaled
Its a const method i.e. it will not change the object state. What you need is this :-
.
.
image = image.scaled(50,50,Qt::KeepAspectRatio);
.
.