Results 1 to 3 of 3

Thread: How to open url in default webbrowser ?

  1. #1
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default How to open url in default webbrowser ?

    Hi

    I am using QT4.3.4 on mac os, To open url I used

    Qt Code:
    1. QLabel property setOpenExternalLinks ( bool open )
    To copy to clipboard, switch view to plain text mode 

    When i login as a root user then it opens the link in the default web browser, but when i login as a admin user then i wont opens it in the default web browser that is set.

    Can u pls tell me , how can i open url in default web browser.

    Thanks
    Always Believe in Urself
    Merry

  2. #2
    Join Date
    Jan 2006
    Location
    Napoli, Italy
    Posts
    621
    Thanks
    5
    Thanked 86 Times in 81 Posts
    Qt products
    Qt3 Qt4
    Platforms
    Unix/X11 Windows

    Default Re: How to open url in default webbrowser ?

    Try with QDesktopServices::openUrl.

    I cannot try in MacOS but it should be platform independent
    A camel can go 14 days without drink,
    I can't!!!

  3. #3
    Join Date
    Jan 2007
    Posts
    326
    Thanks
    42
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    MacOS X

    Default Re: How to open url in default webbrowser ?

    Thanks for the reply but

    QLabel::OpenExternalLinks() Specifies whether QLabel should automatically open links using QDesktopServices::openUrl()
    Always Believe in Urself
    Merry

Similar Threads

  1. Open URL on Non Default Browser
    By sheeeng in forum Qt Programming
    Replies: 3
    Last Post: 27th July 2009, 07:34
  2. Replies: 2
    Last Post: 25th April 2009, 08:50
  3. Replies: 7
    Last Post: 5th January 2009, 08:27
  4. How to open a HTML-file with the default webbrowser?
    By Teuniz in forum Qt Programming
    Replies: 2
    Last Post: 15th November 2007, 11:58
  5. How to open a document with the default application?
    By SkripT in forum Qt Programming
    Replies: 7
    Last Post: 30th April 2006, 08:47

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
  •  
Qt is a trademark of The Qt Company.