lang/pysideex/ GraphicsView1
Hello World
import sys
from PySide6.QtCore import *
from PySide6.QtGui import *
from PySide6.QtWidgets import *
from PySide6.QtNetwork import *
# Irrelevant, but this is how to avoid passing command line args to QApplication
args = sys.argv[1:]
for arg in args:
print(arg)
app = QApplication(sys.argv[:1]) # this basically makes it look like there were no arguments
# The simple Hello World example
scene = QGraphicsScene()
scene.addText("Hello, world!")
view = QGraphicsView(scene)
view.show()
exit(app.exec())