QtQuick.Dialogs: check for inheriting from QApplication

Widget-based dialogs are allowed if the application is a
QApplication, but subclassing is OK too.

Task-number: QTBUG-35769
Change-Id: Iec329792d7c1d85adcb1c3542444f0e92792b20b
Reviewed-by: Liang Qi <liang.qi@digia.com>