I have created a custom widget that has things different graphs that are placed on it by a QPainter. (Not sure if this info is needed or not). When I start the program everything comes up fine, but when I change the size of the window the custom widget just stays the same size and everything around it is distorted.

The custom widget is in a vertical layout and the custom widget is a public QWidget.