Fix moving widgets in horizontal layouts in RTL mode.

Task-number: QTBUG-25872

Change-Id: Ia311b88f0ed3450d798bc5a9136e978c642d5b25
Reviewed-by: Jarek Kobus <jaroslaw.kobus@digia.com>
(cherry picked from qttools/eb456f72052b02a77e22868bfa55a25d7af3e660)
Add WindowStateChanged event

Not currently considering activation state.

backport from qt5 8dc2f81c9f0e6eb8cab09e5d682358fd140b49b8

Change-Id: Ib46e554b08cc8d15f83e9865a8f0be3f8d7b9d16
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>