[Qt-interest] painting widgets in console applications?

Daniel Franke franke.daniel at gmail.com
Fri Feb 13 21:37:44 CET 2009


On Friday 13 February 2009 13:49:31 Bachrach, Robert L wrote:
> > I implemented a Qt/Qwt-based plotting application to plot
> > particular measurement data. The application provides an
> > export functionality to save the plotting widget into an
> > image file via QPixmap. All nice and shiny so far.
> >
> > Now I'd like to run my app from the console and directly
> > export into an image file without showing a user interface.
> > Render()'ing the widget directly onto a QPixmap works, but
> > still requires some form of window manager to be
> > active/accessible (i.e. QApplication(argc, argv,
> > enableGUI=true)).
>
> To my knowledge, you simply cannot create widgets without a server.  If you
> don't need the plot to look exactly the same as in the GUI, you might
> consider looking at GNUplot (http://www.gnuplot.info/).  It allows you to
> create robust plots using a scripting language and display them to a
> variety of devices, including image files.  I have used this on many
> occasions to generate plot images in scripts.

GNUplot is essentially were I (more precisely my predecessors) come from.
Qt/Qwt were chosen as a nicely integrated and cross-platform plotting 
facility. Also using it to generate images on the fly was added to requested 
feature list only recently.

Thanks so far.

	Daniel




More information about the Qt-interest-old mailing list