Before QDesktopServices qt4.2 i use this function to open explorer file url & other mailto:xxx ecc....

Qt Code:
  1. /* open file browser explorer finder pdf doc ecc... url mail ecc on other programm */
  2. void Base_Function::OpenUrl_File_Dir_Dektop( QString item )
  3. {
  4. #if defined(Q_WS_WIN)
  5. s << "url.dll,FileProtocolHandler" << item;
  6. p.startDetached(QString("rundll32.exe") , s );
  7. #endif
  8. #if defined Q_WS_MAC
  9. macs << item; /* oeffnet der default browser */
  10. m.startDetached(QString("open") , macs ); /* open file weburl .... finder e other */
  11. #endif
  12. }
To copy to clipboard, switch view to plain text mode 

Now QDesktopServices open only Url http:/..... or mail to ....
& !not open file pdf or doc or other same as up write function....

wath is the location of QDesktopServices to expand this class? and Add other url different as http://

but now QDesktopServices is super to open url on linux.... method "open" exist only on mac...


Qt Code:
  1. #include <QDesktopServices>
  2. #define HOME_DIR_YOUR \
  3. QString( "%1/ale.png" ).arg( QDir::homePath())
  4. QUrl youhome(HOME_DIR_YOUR); /* filee path not open */
  5. QUrl youhome1("http://www.qtcentre.org/forum/"); /* running open browser*/
  6. QDesktopServices::openUrl (youhome);
To copy to clipboard, switch view to plain text mode