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

List:       kde-devel
Subject:    Re: [kde-devel] Re: error in a test with className()
From:       Christian Kienle <christian-kienle () losg ! org>
Date:       2004-12-29 10:34:35
Message-ID: 3BDB2B80-5985-11D9-AE4C-000D93B0D510 () losg ! org
[Download RAW message or body]

Howdy,

I have seend this email on the kde mailinglist. Well - you question is 
a long time ago so I write you this email, that you recognize my 
answer...

I have just a little tip for you! Don't use className(). Use bool 
QObject::inherits ( const char * clname ) const  instead.

if(w->intherits("beConsole"))

this is much better ;)


Mit freundlichen Grüßen
	
	Christian Kienle
	http://www.QtForum.org




On Dec 16, 2004, at 8:34 pm, Grégoire Alexandre wrote:

> Thanks !
>
> It is so obvious when you got the answer, but I would've never figured 
> out
> myself !
>
> Thanks for help !
>
> Le jeudi 16 Décembre 2004 19:44, David Faure a écrit :
>>> 	if(w->className() == "beConsole")
>>
>> Use qstrcmp to compare two char*, you're currently comparing pointers,
>> which can't work.
>
>>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to 
>>> unsubscribe <<
>

 
>> 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