You don't create them in the layout, you create them dynamically and then add them to the layout using addWidget