Qt5 error with opencv

I get this error when using openCV and Qt5 to stream camera using gStreamer. Any help?

Couldn’t create ddkvic Session: Cannot allocate memory
Using pipeline:
nvarguscamerasrc ! video/x-raw(memory:NVMM), width=(int)640, height=(int)480, format=(string)NV12, framerate=(fraction)60/1 ! nvvidconv flip-method=0 ! video/x-raw, width=(int)640, height=(int)480, format=(string)BGRx ! videoconvert ! video/x-raw, format=(string)BGR ! appsink
nvbuf_utils: Could not create Default NvBufferSession