From kde-devel Thu Nov 09 13:45:53 2000 From: Reginald Stadlbauer Date: Thu, 09 Nov 2000 13:45:53 +0000 To: kde-devel Subject: Re: MORE INFO (Re: What is the difference between dynamic and static_cast) X-MARC-Message: https://marc.info/?l=kde-devel&m=97377699714939 On Thursday 09 November 2000 14:15, mh wrote: > Guillaume Laurent, Don, 09 Nov 2000: > [...] > > > > > void KMFolderTree::doFolderSelected( QListViewItem* qlvi ) > > > > { > > > > [...] > > > > struct Qt {}; > > > > struct QListViewItem: public Qt > > > > { > > > > virtual ~QListViewItem() {;} > > > > }; > > [...] > > > You have another way to check : check what className() returns. Qt has > > its own RTTI system, might as well use it. > > Doesn't this only work for classes that inherit QObject and have the > Q_OBJECT macro in there class declaration? This normally isn't true for > QListViewItem, or am I wrong? Yes, that's correct. Deriving a QListViewItem from QObject is a bit overkill. -- Reggie (reggie@trolltech.com) >> Visit http://master.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<