Skip to content

Instantly share code, notes, and snippets.

@PaulleDemon
Created October 26, 2021 07:02
Show Gist options
  • Save PaulleDemon/0ebbe7f4ff9df0c3d6a86325e04ab0a7 to your computer and use it in GitHub Desktop.
Save PaulleDemon/0ebbe7f4ff9df0c3d6a86325e04ab0a7 to your computer and use it in GitHub Desktop.
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