Results 1 to 2 of 2

Thread: how to open URL

  1. #1
    Join Date
    Aug 2009
    Posts
    122
    Thanks
    74
    Qt products
    Qt4
    Platforms
    Windows

    Default how to open URL

    Hello!

    What is the simplest possible code in Qt that could open a URL and check if it opened properly (if the website existed). Thanks!

  2. #2
    Join Date
    Nov 2007
    Posts
    103
    Thanks
    71
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: how to open URL

    Make a slopt named testUrl and try this:

    Qt Code:
    1. void MyWidget::testUrl()
    2. {
    3. QUrl myUrl("http://www.yahoo.com");
    4. QDesktopServices::openUrl(myUrl);
    5. }
    To copy to clipboard, switch view to plain text mode 
    Use computer programming to do science!
    www.scienceprogramming.com

  3. The following user says thank you to tommy for this useful post:

    timmu (23rd August 2009)

Similar Threads

  1. Open file without run again the program
    By avis_phoenix in forum Qt Programming
    Replies: 1
    Last Post: 7th August 2009, 23:01
  2. Replies: 4
    Last Post: 3rd August 2009, 20:25
  3. QTextBrowser: Cannot open
    By veda in forum Qt Programming
    Replies: 3
    Last Post: 27th December 2007, 12:05
  4. again Open Cascade + Qt 4.2.2 but detailed...
    By Shuchi Agrawal in forum Qt Programming
    Replies: 11
    Last Post: 1st February 2007, 07:03
  5. again Open Cascade + Qt 4.2.2 but detailed...
    By Shuchi Agrawal in forum Qt Programming
    Replies: 1
    Last Post: 18th January 2007, 06:50

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.