rewrite QWidget to QGraphics