qt4 - How to open a PDF-file using default application on Windows with QProcess? -


i'm trying open pdf file in acrobat-reader using

qprocess::startdetached("start c:\\temp\\mypdf.pdf") 

no success :-(

if type same in console acrobat starts fine , loads pdf file.

what missing?

i'm using qt4.8.4 on windows 7

edit

it works using:

qprocess::startdetached( "cmd /q /c \"start c:\\temp\\report.pdf\"" ); 

but black console window appears short time - not nice.

you might want qdesktopservices. qprocess starts program, has not understanding of underlying system. qdesktopservices does.


Comments

Popular posts from this blog

ios - UICollectionView Self Sizing Cells with Auto Layout -

node.js - ldapjs - write after end error -

DOM Manipulation in Wordpress (and elsewhere) using php -