initial commit, nothing much here
This commit is contained in:
15
grid/ui/sphere_widget.py
Normal file
15
grid/ui/sphere_widget.py
Normal file
@@ -0,0 +1,15 @@
|
||||
from PySide6.QtCore import Qt
|
||||
from PySide6.QtGui import QPaintEvent, QPainter, QPalette
|
||||
from PySide6.QtWidgets import QApplication, QVBoxLayout, QWidget
|
||||
|
||||
class SphereWidget(QWidget):
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
|
||||
def paintEvent(self, event: QPaintEvent) -> None:
|
||||
with QPainter(self) as painter:
|
||||
painter.setRenderHint(QPainter.Antialiasing)
|
||||
painter.setBrush(Qt.red)
|
||||
painter.drawEllipse(0, 0, self.width(), self.height())
|
||||
return super().paintEvent(event)
|
||||
Reference in New Issue
Block a user