Why exactly do you subclass QDockWidget? Shouldn't you be subclassing the class you put inside the dock widget instead?