[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Example code to fire up a browser?
From:       Espen Sand <espen.sand () neo ! no>
Date:       2000-02-10 10:43:01
[Download RAW message or body]

On ons, 09 feb 2000, claus wilke wrote:
>Hi,
>
>can anybody give me some example code that allows me to fire up a browser
>(konqueror) when a user klicks on a link that I display in QTextView? I assume
>its just a couple of lines, right?
>
>There are two things I need:
>a) how to I get the information that the user clicked on a link?
>b) how do I fire up the browser and feed it with the appropriate URL?
>
>Many thanks,
>  Claus

If you can use QTextBrowser instead, then KTextBrowser will do what you want. 
It will automatically start the system browser or system mailer. 

See kdeui/ktextbrowser.h,cpp for for it can be done. But I can tell you that
there exists KApplication::invokeBrowser( const QString &url ) and 
KApplication::invokeMailer(  const QString &address, const QString &subject )
in case you want to play with QTextView.

-- 
Espen Sand

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic