[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: KHTMLPart signal URLclicked
From: Raphael Wegmann <wegmann () psi ! co ! at>
Date: 2002-03-10 17:25:20
[Download RAW message or body]
On Fri, 2002-03-08 at 00:24, David Faure wrote:
> On Thursday 07 March 2002 23:41, Raphael Wegmann wrote:
> > On Wed, 2002-03-06 at 09:29, Kevin Krammer wrote:
> > > -----BEGIN PGP SIGNED MESSAGE-----
> > > Hash: SHA1
> > >
> > > On Wednesday, 6. March 2002 02:11, Raphael Wegmann wrote:
> > > > Thanks for your help.
> > > > I can connect to the signal, but unfortunately the signal doesn't
> > > > get emitted, when I click a HTML-link in my KHTMLPart.
> > > >
> > > > KParts::BrowserExtension *myBrowser = myKHTMLPart->browserExtension();
> > > > connect (myBrowser, SIGNAL (openURLRequestDelayed (const KURL &,
> > > > const KParts::URLArgs &)), SLOT (URLclicked (const KURL &)));
> > >
> > > Try the openURLRequest signal. Same instance, same arguments, just delete the
> > > "Delayed"
> > >
> >
> > Hello.
> >
> > Neither openURLRequestDelayed nor openURLRequest signals get emitted. :(
>
> They are, but by the _browser extension_ not from the part - that might
> be the confusion here.
>
Hello.
Thanks for your comment, but I don't think I understand.
I connect the signal openURLRequestDelayed from myBrowser,
which is of type KParts::BrowserExtension to the public
slot URLclicked from my parent class called PHPbrowser.
// Here's my class definition:
class PHPbrowser:public QDialog
{
Q_OBJECT public:
PHPbrowser (QWidget * parent = 0, const char *name = 0,
bool modal = FALSE, WFlags fl = 0);
~PHPbrowser ();
KURL url;
KHTMLPart *KTextBrowser1;
KParts::BrowserExtension *myBrowser;
public slots:
void URLclicked (const KURL &, const KParts::URLArgs &);
bool openURL(const KURL &);
};
// In the PHPbrowser constructor, I do:
PHPbrowser::PHPbrowser (QWidget * parent, const char *name,
bool modal, WFlags fl):
QDialog (parent, name, modal, fl)
{
// [...]
openURL(KURL("file:/usr/local/share/phpbrowser/index.php" ));
myBrowser = KTextBrowser1->browserExtension ();
connect (myBrowser, SIGNAL (openURLRequest (const KURL &,
const KParts::URLArgs &)), this,
SLOT (URLclicked (const KURL &, const KParts::URLArgs &)));
}
Everything compiles fine and the first page gets loaded successfully,
but I don't get a signal, when I click the link on my first page. :(
Thank you for your help.
--
Raphael Wegmann
raphael@wegmann.at
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic