fixed 'attempting to set qlayout...' bug