[libcamera-devel] Trying to use libcamera with Qt

Jason H jhihn at gmx.com
Thu Mar 25 20:28:02 CET 2021



> Sent: Thursday, March 25, 2021 at 3:14 PM
> From: "Jason H" <jhihn at gmx.com>
> To: libcamera-devel at lists.libcamera.org
> Subject: [libcamera-devel] Trying to use libcamera with Qt
>
> I was using Raspicam library, but it looks like this one (libcamera) is the one to use if I need to control gains and shutter speed.
> I am using Qt5.15. I set Qt to use c++14 and set the include path, #included libcamera/libcamera.h and got:
> 
> 
> /usr/local/include/libcamera/libcamera/signal.h:31:17: error: expected unqualified-id before ‘)’ token
>   SlotList slots();
>                  ^
> /usr/local/include/libcamera/libcamera/signal.h:119:16: error: expected ‘)’ before ‘...’ token
>   void emit(Args... args)
> 
> I am trying to use this library in a Qt project, but I get a compile error in:
> 
> Qt does use the word `slots`, but only for classes marked Q_OBJECT this one is not marked Q_OBJECT.

So it looks I was wrong about Q_OBJECT being the gatekeeper. Once I config no_keywords in Qt, it works. It's a shame I have to do that for one variable name.
It is the project using Boost at all? It doesn't look like it, but I am not a boost expert.





More information about the libcamera-devel mailing list