Small adjustments made to stop getting warning when using layout->takeAt(0)