[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-devel
Subject: Re: MORE INFO (Re: What is the difference between dynamic and static_cast)
From: Reginald Stadlbauer <reggie () trolltech ! com>
Date: 2000-11-09 13:45:53
[Download RAW message or body]
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 <<
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic