void MyClass::exportTeX(const QString& fileName)
{
QTeXPaintDevice tex(fileName, QSize(500, 400));
QPainter paint.begin(&tex);
// ... perform your painting operations here ...
paint.end();
}
QTeXEngine can generate TeX code using either Pgf or TikZ syntax.
TikZ syntax is the default mode since the ouput files are more compact and easier to read.