zorro68
19th June 2008, 19:26
I want to open a pdf file with the default browser. I try this:
QString path=QApplication::applicationDirPath()+"/manual.pdf";
QUrl url;
url.fromLocalFile(path);
QDesktopServices::openUrl(url);
The path variable is ok, but the url variable is empty. Anyone knows what happend? or how to open a pdf file with qt (only a viewer)?
Thanks in advance
QString path=QApplication::applicationDirPath()+"/manual.pdf";
QUrl url;
url.fromLocalFile(path);
QDesktopServices::openUrl(url);
The path variable is ok, but the url variable is empty. Anyone knows what happend? or how to open a pdf file with qt (only a viewer)?
Thanks in advance