QWidgets don’t like to be stored in smart pointers, because Qt handles their reference counting and destruction itself.