Files
sphere-grid/grid/ui/window.py
Alexandre RIO 6a63ff5d0b
Some checks failed
CI/CD / build (push) Successful in 9m25s
CI/CD / wol (push) Has been cancelled
use logging and cleanup
2025-08-18 21:30:26 +02:00

44 lines
878 B
Python

import logging
import sys
from PySide6.QtGui import QPainter
from PySide6.QtWidgets import (
QApplication,
QGraphicsScene,
QGraphicsView,
QHBoxLayout,
QWidget,
)
from grid.ui.pattern import Pattern
class Window(QWidget):
def __init__(self):
super().__init__()
self.setWindowTitle("sphere grid")
self.setGeometry(0, 0, 600, 600)
self.scene = QGraphicsScene(0, 0, 600, 600)
pp = Pattern(0, 0)
self.scene.addItem(pp)
view = QGraphicsView(self.scene)
view.setRenderHint(QPainter.RenderHint.Antialiasing)
vbox = QHBoxLayout(self)
vbox.addWidget(view)
self.setLayout(vbox)
self.show()
logging.basicConfig(
level=logging.DEBUG,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s",
)
app = QApplication(sys.argv)
w = Window()
app.exec()