I delete the files mpl.dvi, mpl.ps and mpl.pdf. Modify the file mpl.tex open the program click on Button, who has the code below, and it shows that the mpl.pdf delete previously. I do not understand. This file is updated only when mpl.pdf click for the second time the Button.
void Mpl::openPdf()
{
if (latexfile->waitForStarted())
cout << "Erro" << endl;
psfile
->start
("dvips",
QStringList() <<
"-ta4" <<
"-o" <<
"mpl.ps" <<
"mpl.dvi");
pdffile
->start
("ps2pdf",
QStringList() <<
"mpl.ps" <<
"mpl.pdf");
openpdf
->start
("/usr/bin/acroread",
QStringList() <<
"mpl.pdf");
}
void Mpl::openPdf()
{
QProcess *latexfile = new QProcess;
QProcess *psfile = new QProcess;
QProcess *pdffile = new QProcess;
QProcess *openpdf = new QProcess;
latexfile->start("latex",QStringList() << "mpl.tex");
if (latexfile->waitForStarted())
cout << "Erro" << endl;
psfile->start("dvips", QStringList() << "-ta4" << "-o" << "mpl.ps" << "mpl.dvi");
pdffile->start("ps2pdf", QStringList() << "mpl.ps" << "mpl.pdf");
openpdf->start("/usr/bin/acroread", QStringList() << "mpl.pdf");
}
To copy to clipboard, switch view to plain text mode
Somebody can help me, please?
Bookmarks