[Interest] moc code : incomplete type 'void' is not assignable [FIXED]

Jason H jhihn at gmx.com
Thu Jul 23 17:05:00 CEST 2015


Sorry, I got bit by copy-paste. It should be:

Q_PROPERTY(QCamera* setCamera READ camera WRITE setCamera)


> Sent: Thursday, July 23, 2015 at 10:56 AM
> From: "Jason H" <jhihn at gmx.com>
> To: interest <interest at qt-project.org>
> Subject: [Interest] moc code : incomplete type 'void' is not assignable
>
> I'm getting an error in moc-generated file, and I don't know why. 
> 
> error: incomplete type 'void' is not assignable
>         case 1: *reinterpret_cast< void*>(_v) = _t->camera(); break;
>                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
> 
> The header file contains:
> #include <QObject>
> #include <QCamera>
> class FlashControl : public QObject
> {
> 	Q_OBJECT
> 	QCamera *_camera;
> public:
> ...
> 	Q_PROPERTY(void setCamera READ camera WRITE setCamera)
> 
> public slots:
> ...
> 	void setCamera(QObject *qmlCamera);
> 	QObject* camera();
> 
> 
> };
> 
> Does anyone have any ... pointers? (Sorry for the pun!)
> _______________________________________________
> Interest mailing list
> Interest at qt-project.org
> http://lists.qt-project.org/mailman/listinfo/interest
> 



More information about the Interest mailing list