according to the Qt specification QGraphicsScene is a viewless data model of QGraphicsItems. I have a tool which can be used in windowed and in non-windowed mode (when providing commandline arguments to it). In non windowed mode it should run as a console application (e.g. not connecting to X or so). However either I use the application as a QCoreApplication (qt5) or I set the guienabled flag (qt4) to false in QApplication my application (obviously?) crashes when trying to instantiate the QGraphicsScene object.
Any idea how to use QGraphicsScene in a console application (apart from "no, you can't")? Thanks,
QGraphicsScene
is in the widgets library so I assumed it must needQPainter
- but there's nothing in the API or docs that states it must be able to render anything. What does your debugger say when it crashes? – Izmir