Updated the example so that it adapts to the orientation change

The example was using a Row type to present the visual items, which is
changed to Flow type now, so that the items are rearranged based on the
orientation change on a Mobile device.

Task-number: QTBUG-37203
Change-Id: I990f77a87c409b623a7fe4495d74206a1ca2e1c7
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
QtQuick.Dialogs: check for inheriting from QApplication

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

(cherry-picked from qtdeclarative 76952046ceccf2cd176a3452bc908cac769f90d9)
Task-number: QTBUG-35769
Change-Id: I0b74c870488c157913a68e1a30744cd46ae82cee
Reviewed-by: Liang Qi <liang.qi@digia.com>
Merge remote-tracking branch 'origin/5.3' into dev

Change-Id: Iac8c62211c34b36394812d9afedd362a62ba6cef