#includeIn the above example, a QVBoxLayout object is created, and a QLabel and QPushButton are added to it using the addWidget() function. Finally, the QVBoxLayout object is set as the layout of the main window using the setLayout() function. This example code uses the Qt Widgets package library.#include #include // create the vertical box layout QVBoxLayout* vboxLayout = new QVBoxLayout(); // create a label and add it to the layout QLabel* label = new QLabel("Hello World!"); vboxLayout->addWidget(label); // create a push button and add it to the layout QPushButton* button = new QPushButton("Click me"); vboxLayout->addWidget(button); // set the layout of the main window to the vertical box layout setLayout(vboxLayout);