From kde-devel Wed Dec 29 10:34:35 2004 From: Christian Kienle Date: Wed, 29 Dec 2004 10:34:35 +0000 To: kde-devel Subject: Re: [kde-devel] Re: error in a test with className() Message-Id: <3BDB2B80-5985-11D9-AE4C-000D93B0D510 () losg ! org> X-MARC-Message: https://marc.info/?l=kde-devel&m=110432102019998 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 <<