QMetaObject::connectSlotsByName: No matching signal for on_MainWindow_destroyed()
It means you have an automatically named slot method in the main window or top-level widget.
Qt will automatically connect slots for child widgets, but not the top-level widget.
To solve this problem, you need to:
- Rename the slot so it doesn't start with "on_"
- Manually connect the slot.
I've reported this as Qt Designer bug QT-7582.