QProcess open all file -> url.dll,FileProtocolHandler
To open file , doc, pdf , url , xml, ecc...
i found this method .... on win32..
Code:
/* function preview html result ...*/
bool is;
/*file_put_contents(BROWSER_PAGE_2,TidyXHTML(bridge_real_tag));*/
is = file_put_contents(BROWSER_PAGE_1,bridge_real_tag); /* path/index.html */
if (is) {
#if defined(Q_WS_WIN)
s << "url.dll,FileProtocolHandler" << BROWSER_PAGE_1;
p.
startDetached(QString("rundll32.exe") , s
);
#endif
#if defined( Q_WS_MACX )
/* ............ */
#endif
#if defined( Q_WS_X11 )
/* ............ */
#endif
}
and on mac anybody know a similar function? or hack?
Re: QProcess open all file -> url.dll,FileProtocolHandler
Since there is no central management of mime-types on Unix, you will probably have to go KDE and/or Gnome-specific there. As for OS X - I don't know.
Re: QProcess open all file -> url.dll,FileProtocolHandler
Quote:
Originally Posted by e8johan
Since there is no central management of mime-types on Unix, you will probably have to go KDE and/or Gnome-specific there. As for OS X - I don't know.
I solved problem to open file url mailto:xxx@xxx.com pdf ecc...
open url file code .....
Code:
void Gui_Main::OpenUrl()
{
#if defined(Q_WS_WIN)
s << "url.dll,FileProtocolHandler" << "http://www.osxentwicklerforum.de/";
p.
startDetached(QString("rundll32.exe") , s
);
#endif
#if defined Q_WS_MAC
macs << "http://www.osxentwicklerforum.de/";
m.
startDetached(QString("open") , macs
);
#endif
}
Simple :) on mac is possibel to use...
QProcess p;
p.addArgument( "/usr/bin/osascript" );
p.addArgument( scriptFilename );
p.start();
apple script mount a samba , webdav disk and moore application or cronjobs....