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

List:       kde-devel
Subject:    Re: http://techbase.kde.org/Help:Contents
From:       Tomaz Canabrava <tumaix () gmail ! com>
Date:       2010-01-02 13:05:03
Message-ID: 7ebbb4b51001020505s1e5ab0f0wc56906c52570ccb7 () mail ! gmail ! com
[Download RAW message or body]

KWebView *obj = qobject_castt<KWebView*>(sender());

this way you will have the emitting obj, and thus, can get the name.

On Sat, Jan 2, 2010 at 7:36 AM, Thomas Baumgart <thb@net-bembel.de> wrote:
> On Saturday 02 January 2010 05:20:08 Lindsay Mathieson wrote:
>> Newish to QT coding - I have a KTabWidget containing KWebView widgets in it
>> tabs. I'd like to respond to the KWebView signal "titleChanged(const
>> QString& title)" in my dereived KTabWidget to set the tab titles
>> appropriately.
>>
>>
>> However one can't tell from the signal which KWebView has changed and hence
>> which Tab to change.
>>
>> What's the best way handle this normally? just looking for pointers, not
>> code.
>
> Couldn't you use the QObject::sender() method inside the slot to retrieve a
> pointer to the emitting object?
>
> --
>
> Regards
>
> Thomas Baumgart
>
> GPG-FP: E55E D592 F45F 116B 8429   4F99 9C59 DB40 B75D D3BA
> -------------------------------------------------------------
> A: I hear that if you play the Windows XP CD backwards, you
>  get a Satanic message!
> B: That's nothing. If you play it forward, it installs WinXP!
> -------------------------------------------------------------
>
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
>
>



-- 
Um Computador sem Windows é como um Navio sem dançarinas de Can-Can
 
>> 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