[prev in list] [next in list] [prev in thread] [next in thread]
List: koffice-devel
Subject: C++ help, please...
From: Thomas Zander <zander () kde ! org>
Date: 2006-05-29 21:28:04
Message-ID: 200605292328.04851.zander () kde ! org
[Download RAW message or body]
[Attachment #2 (multipart/signed)]
I've been trying to fix this problem for too long; I must be missing
something obvious.
In Flake I have an interface for a canvas; the KoCanvasBase class.
I have another class, with a KoCanvasView::setCanvas() method that will
use the canvas in two ways; as a widget and it will talk to the object
via the above interface.
In KWord I have a KWCanvas which implements both:
class KWCanvas : public QWidget, public KoCanvasBase
I instantiate it and then pass it to the setCanvas call. (done in the
KWGUI class) Obviously I need to downcast it either to QWidget or to
KoCanvasBase.
In the setCanvas method I then do a dynamic_cast.
Problem is that if I downcast to a KoCanvasBase the dynamic cast to a
QWidget fails.
Same problem; if I downcast to a QWidget the dynamic cast to a
KoCanvasBase gives me a nullpointer.
Anyone can restore the sanity by telling me WTF is going on? Or better;
fix the sources in koffice svn ;)
--
Thomas Zander
[Attachment #5 (application/pgp-signature)]
_______________________________________________
koffice-devel mailing list
koffice-devel@kde.org
https://mail.kde.org/mailman/listinfo/koffice-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic