Results 1 to 3 of 3

Thread: QProcess open all file -> url.dll,FileProtocolHandler

  1. #1
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default QProcess open all file -> url.dll,FileProtocolHandler

    To open file , doc, pdf , url , xml, ecc...
    i found this method .... on win32..
    Qt Code:
    1. /* function preview html result ...*/
    2. bool is;
    3. /*file_put_contents(BROWSER_PAGE_2,TidyXHTML(bridge_real_tag));*/
    4. is = file_put_contents(BROWSER_PAGE_1,bridge_real_tag); /* path/index.html */
    5. if (is) {
    6. #if defined(Q_WS_WIN)
    7. s << "url.dll,FileProtocolHandler" << BROWSER_PAGE_1;
    8. p.startDetached(QString("rundll32.exe") , s );
    9. #endif
    10. #if defined( Q_WS_MACX )
    11. /* ............ */
    12. #endif
    13. #if defined( Q_WS_X11 )
    14. /* ............ */
    15. #endif
    16. }
    To copy to clipboard, switch view to plain text mode 

    and on mac anybody know a similar function? or hack?

  2. #2
    Join Date
    Jan 2006
    Location
    Alingsås, Sweden
    Posts
    437
    Thanks
    3
    Thanked 39 Times in 39 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default 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.

  3. #3
    Join Date
    May 2006
    Posts
    788
    Thanks
    49
    Thanked 48 Times in 46 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default 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 .....
    Qt Code:
    1. void Gui_Main::OpenUrl()
    2. {
    3. #if defined(Q_WS_WIN)
    4. s << "url.dll,FileProtocolHandler" << "http://www.osxentwicklerforum.de/";
    5. p.startDetached(QString("rundll32.exe") , s );
    6. #endif
    7. #if defined Q_WS_MAC
    8. macs << "http://www.osxentwicklerforum.de/";
    9. m.startDetached(QString("open") , macs );
    10. #endif
    11. }
    To copy to clipboard, switch view to plain text mode 

    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....

Similar Threads

  1. Replies: 3
    Last Post: 25th August 2010, 12:39
  2. How to play .wav file by QProcess
    By Krishnacins in forum Qt Programming
    Replies: 6
    Last Post: 5th July 2006, 08:04
  3. QProcess / system call not working under linux. Why?
    By johnny_sparx in forum Qt Programming
    Replies: 12
    Last Post: 11th March 2006, 00:32
  4. QProcess in a QThread
    By chombium in forum Qt Programming
    Replies: 2
    Last Post: 11th January 2006, 15:52
  5. QProcess problem with windows batch file
    By bood in forum Qt Programming
    Replies: 11
    Last Post: 6th January 2006, 08:08

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.