Created
October 26, 2021 07:02
-
-
Save PaulleDemon/0ebbe7f4ff9df0c3d6a86325e04ab0a7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys | |
from PyQt5.QtWidgets import QApplication, QWidget, QLabel, QPushButton, QGridLayout | |
app = QApplication(sys.argv) | |
widget = QWidget() | |
grid_layout = QGridLayout() | |
label = QLabel("Sample label") | |
button = QPushButton("Button") # create an instance of QPushbutton | |
grid_layout.addWidget(label, 0, 0) | |
grid_layout.addWidget(button, 1, 0) | |
widget.setLayout(v_layout) | |
widget.show() | |
sys.exit(app.exec()) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment