KJanusWidget and Model-View (was: Re: KDialog / KDialogBase)

Matthias Kretz Matthias.Kretz at urz.uni-heidelberg.de
Wed May 10 18:00:11 BST 2006


On Tuesday, 9. May 2006 17:37, Michael Pyne wrote:
> On Tuesday 09 May 2006 04:16, Tobias Koenig wrote:
> > On Mon, May 08, 2006 at 11:41:13PM +0200, Matthias Kretz wrote:
> > > On Monday, 8. May 2006 17:28, Tobias Koenig wrote:
> >
> > Hi Matthias,
> >
> > > > Passing the icon, name and title through a QVariant is fine, but how
> > > > to you want to pass the QWidget pointer?
> > >
> > > QWidget* test = new QWidget;
> > > QVariant testvar = QVariant::fromValue( test );
> > > QWidget* test2 = qvariant_cast<QWidget*>( testvar );
> > > => test == test2
> >
> > Hmm, casting to an integer? Is it portable?
>
> No, casting a pointer to an integer is not portable.

http://doc.trolltech.com/4.1/qvariant.html#qVariantFromValue

I don't see where a cast to an integer involved in the above code. The code 
above should be no problem.

-- 
C'ya
        Matthias
________________________________________________________
Matthias Kretz (Germany)                            <><
http://Vir.homelinux.org/
MatthiasKretz at gmx.net, kretz at kde.org,
Matthias.Kretz at urz.uni-heidelberg.de
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20060510/2d38d3e6/attachment.sig>


More information about the kde-core-devel mailing list