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

Issues changing the value of an element in an array in matlab -

php - MySQLi binding parameters in a prepared statement doesn't work unless inserted after "WHERE" -

vb.net - Alternative to the T-SQL AS keyword -