Skip to content

Instantly share code, notes, and snippets.

@tlambert03
Created November 10, 2024 16:55
Show Gist options
  • Save tlambert03/5499436a49afa38990f0e447183ff797 to your computer and use it in GitHub Desktop.
Save tlambert03/5499436a49afa38990f0e447183ff797 to your computer and use it in GitHub Desktop.
Shared script for uv run
# /// script
# requires-python = ">=3.13"
# dependencies = [
# "pyqt6",
# ]
# ///
import sys
from PyQt6.QtWidgets import QApplication, QWidget, QLabel, QGridLayout
app = QApplication(sys.argv)
widget = QWidget()
grid = QGridLayout()
text_label = QLabel()
text_label.setText("Hello World!")
grid.addWidget(text_label)
widget.setLayout(grid)
widget.setGeometry(100, 100, 200, 50)
widget.setWindowTitle("uv")
widget.show()
sys.exit(app.exec())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment