Make example work when QOffscreenSurface == QWindow

Change-Id: I7435d91b37a46c0bced301c5c9c82fdf499e0587
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>