please read the documentation or any book about Qt! Start the documentation on how to use layouts!