Use the correct 'no-widgets' check

Change-Id: I754f785625a534886c6c40f1e850b90cf2418297
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>