[Qt-interest] multiple inheritance problem
Donal O'Connor
donaloconnor at gmail.com
Thu Jul 2 15:50:02 CEST 2009
I think you can use the virtual keyword to resolve this problem but multiple
inheritence should be avoided if possible.
On Thu, Jul 2, 2009 at 2:41 PM, "Alexander Carôt"
<alexander_carot at gmx.net>wrote:
> Hi all,
>
> I have a "standard" problem but don't know how to solve it:
>
> I have a class, which has to inherit from QWidget and QThread:
>
> class circularbuffer : public QWidget, public QThread{
> Q_OBJECT
> .....
> }
>
> In the constructor I need to call this:
>
> QObject::connect(bufferslide,SIGNAL( valueChanged( int ) ), this, SLOT(
> dataSetSlot() ) );
>
> This generated the following error due to multiple inheritance:
>
> error: ‘QObject’ is an ambiguous base of ‘circularbuffer’
>
>
> What should I change/modify in order to prevent this problem ?
>
> Thanks a lot in advance
>
> -- A l e x
>
>
>
>
>
>
>
>
>
> Furthermore, it has to
>
>
> circularbuffer.cpp:36: error: ‘QObject’ is an ambiguous base of
> ‘circularbuffer’
>
> --
> Dipl.-Ing. Alexander Carôt
> PhD Candidate
> Email : Alexander at Carot.de
> Tel.: +49 (0)177 5719797
>
>
>
> Neu: GMX Doppel-FLAT mit Internet-Flatrate + Telefon-Flatrate
> für nur 19,99 Euro/mtl.!* http://portal.gmx.net/de/go/dsl02
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090702/5c3d67d2/attachment.html
More information about the Qt-interest-old
mailing list