import sys from PySide2.QtWidgets import QApplication, QVBoxLayout, QPushButton, QWidget app = QApplication(sys.argv) window = QWidget() layout = QVBoxLayout() layout.addWidget(QPushButton("Button 1")) layout.addWidget(QPushButton("Button 2")) layout.addWidget(QPushButton("Button 3")) layout.setSpacing(20) layout.setAlignment(Qt.AlignCenter) layout.setSizeConstraint(QtWidgets.QLayout.SetFixedSize) window.setLayout(layout) window.setWindowTitle("FixedSize Example") window.show() sys.exit(app.exec_())In this example, a window is created with a QVBoxLayout containing three QPushButton widgets. The setSpacing() method is used to add spacing between the buttons, and the setAlignment() method is used to center the buttons within the layout. The setSizeConstraint() method is then called with the QtWidgets.QLayout.SetFixedSize value to set the size constraint of the layout to fixed size. The package library used in this example is PySide2.QtWidgets, which is a Python binding for the Qt application framework.