Hi guys
I'm trying to launch a html file from my app:
QString str
= path
+tr
("/mat_html/mat_manual_en.html");
QMessageBox::about(0,tr
("Error"),tr
("Error. Help file not found")+"\n"+str
);
QString path = QApplication::applicationDirPath();
QString str = path +tr("/mat_html/mat_manual_en.html");
if ( ! QDesktopServices::openUrl(QUrl( str, QUrl::TolerantMode )) )
QMessageBox::about(0,tr("Error"),tr("Error. Help file not found")+"\n"+str);
To copy to clipboard, switch view to plain text mode
So far so good, it work's on several directorys, except for the "program files" windows directory.
It seems the portuguese windows version creates some kind of simbolic link directory where in my explorer the file.exe directory is "c:/programas/math graphica", but in command line and the str output is "c:/program files/math graphica".
so I tried a hardcoded version wich still doens't work:
QString str
= path
+tr
("/mat_html/mat_manual_en.html");
QString str2
= "C:/Program Files/Math Graphica"+tr
("/mat_html/mat_manual_en.html");
str2 = "C:/Programas/Math Graphica"+tr("/mat_html/mat_manual_en.html");
QMessageBox::about(0,tr
("Error"),tr
("Error. Help file not found")+"\n"+str
);
QString str = path +tr("/mat_html/mat_manual_en.html");
QString str2 = "C:/Program Files/Math Graphica"+tr("/mat_html/mat_manual_en.html");
str2 = "C:/Programas/Math Graphica"+tr("/mat_html/mat_manual_en.html");
if ( ! QDesktopServices::openUrl(QUrl( str )) &&
! QDesktopServices::openUrl(QUrl( str2 , QUrl::TolerantMode)) )
QMessageBox::about(0,tr("Error"),tr("Error. Help file not found")+"\n"+str);
To copy to clipboard, switch view to plain text mode
So I'm running out of ideias
Bookmarks