Fix build with QT_NO_GRAPHICSVIEW

Change-Id: Ia909a560db58d6cdc6ec4bbac879249eb5e286ef
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>