Results 1 to 8 of 8

Thread: add link that open web browser on unix

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Oct 2006
    Posts
    1
    Qt products
    Qt3
    Platforms
    Unix/X11

    Default add link that open web browser on unix

    hi
    I wish to open a web browser in unix ( mozilla) from QT .
    I saw that this question was asked here before and i used the answer in mu code .
    BUT
    it doesn't work for me. the process crash ( normalExit return 0 ) and no browser is open.

    How can i figure out why it does not work ??
    more details :
    I am working on sun OS
    which i am loged in using the rlogin command
    the DISPLAY env is set correctlly in my ~/.cshrc file.

    here is the code that i copy from this forum :
    and what does Q_UNUSED(this) mean ?

    Qt Code:
    1. bool result = false;
    2. QUrl rUrl("http://www.cnn.com");
    3. QString sUrl = rUrl;
    4. QApplication::setOverrideCursor(Qt::BusyCursor);
    5.  
    6. Q_UNUSED(this);
    7. // Try a range of browsers available on UNIX, until we (hopefully)
    8. // find one that works. Start with the most popular first.
    9. QProcess process;
    10. bool process_started = false;
    11.  
    12. process.setArguments(QStringList() << "mozilla" << sUrl );
    13. process_started = process.start();
    14.  
    15. QApplication::restoreOverrideCursor();
    16.  
    17. return;
    To copy to clipboard, switch view to plain text mode 
    Last edited by jpn; 24th January 2009 at 13:41. Reason: missing [code] tags

Similar Threads

  1. LINK : fatal error LNK1181: can't open 'delayimp.lib'
    By fcamlar in forum Installation and Deployment
    Replies: 10
    Last Post: 7th July 2006, 13:04
  2. Text Browser Link Question
    By taylor34 in forum Qt Programming
    Replies: 2
    Last Post: 20th June 2006, 19:54
  3. Opening swf file in the default browser
    By munna in forum Qt Programming
    Replies: 16
    Last Post: 5th May 2006, 09:33
  4. open a browser
    By npc in forum Newbie
    Replies: 1
    Last Post: 5th April 2006, 10:23

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.