Convenient shortcuts
You can now access the QApplication class as puzzlepiece.QApp
, and pass Piece classes to add_piece
instead of instantiating them first - this will reduce the clutter when building applications, and bring the minimum viable app to this neater form:
import puzzlepiece as pzp
from puzzlepiece.pieces import random_number
app = pzp.QApp([])
puzzle = pzp.Puzzle(app, "Basic example")
puzzle.add_piece("random", random_number.Piece, 0, 0)
puzzle.show()
app.exec()