As the example illustrates, you can simple call imgwdg->setFixedSize(width, height) after creating the instance to set the preferred size of the widget and it will not be resized when the window resizes.