Why does the Octave qt graphics toolkit need a display?

Recently I helped a user of my Octave Docker images and it was discussed some times when using Buildbots or other CI / “headless” systems without monitor attached. However, I do not know the code well enough to give a convincing answer to this question:

Why does the Octave qt graphics toolkit need a display (e.g. xvfb-run) and cannot render “off-screen” like gnuplot?

Without a display, it doesn’t seem to be possible to properly instantiate a QApplication, which is what we currently do prior to running the qt toolkit.

We rely on Qt to provide us with a cross platform way to obtain a valid OpenGL context tied to an off-screen rendering surface. I don’t know if it is possible to do so with a bare QCoreApplication, that doesn’t need a display.

2 Likes