PDA

View Full Version : [SOLVED] QDesktopServices::openUrl() not working on a Win7 machine



sylvaticus
29th November 2012, 09:12
Hello, I use QDesktopServices::openUrl() to opening a local file (.ods) from a button in my program's GUI.

The code is:


QUrl resultsUrl("data/output/results/results.ods", QUrl::TolerantMode);
QDesktopServices::openUrl(resultsUrl);


This code works both in both Ubuntu and WinXP, as long as the machine has .ods files registered with LibreOffice/OpenOffice.
However in a machine of a collegue with Win7 this code doesn't produce anything (and, yes, he has LibreOffice installed and registered with .ods).

What could it be ?

ok.. I got the occasion to try back my collegue pc.. I just keep it posting any how in case someone has the same issue.
For some strange reasons on Ubuntu and Windows XP the relative position was fine (foth in the Qt Creator and in the installed application) but in Windows 7 it seems it wants the full path...