graphgallery example: Fix leaking modifier classes


The modifier classes were leaking. Pass a parent to ensure their
destruction. Remove the deletion of the graphs from their
destructors since they are QWindows, which are deleted by QtGui.

Pick-to: 6.5
Task-number: QTBUG-110698
Change-Id: Ied32dad62c93b730f63fa95994c4fc281254c800
Reviewed-by: Tomi Korpipää <tomi.korpipaa@qt.io>
commitf289b0b14d174d7c891a225c4e81f67573d8c555
parent75e6c7570478442324267a9ea5681571e807e356
authorFriedemann Kleint <Friedemann.Kleint@qt.io>
committerFriedemann Kleint <Friedemann.Kleint@qt.io>
commit timeThu, 2 Mar 2023 08:11:33 +0100