I don't think you are supposed to set a layout on a QScrollArea.
You just set its content widget and it can have any layout you want.

Cheers,
_