[Qt-interest] painting widgets in console applications?
Daniel Franke
franke.daniel at gmail.com
Thu Feb 12 21:51:51 CET 2009
Hi all.
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)). This is
hardly a constraint if run locally, but if run through ssh, which this is
meant to, it is: "myplot: cannot connect to X server" - and x11forwarding is
not always an option. Letting 'enableGUI=false', Qt complains "QWidget: Cannot
create a QWidget when no GUI is being used".
Is there a solution for this?
Thanks
Daniel
More information about the Qt-interest-old
mailing list