Fix memory leak in QtModelingWidgets

Change-Id: Ief3a2388df4a25cb4c2d9408e673fcbc6a0bdc61
Reviewed-by: Sandro S. Andrade <sandroandrade@kde.org>