If <dpy> is not the handle of a valid EGLDisplay object, the error EGL_BAD_DISPLAY is generated

So, where am I wrong?
My code is fired by the the onOpenglContextCreated() signal. Also, I am pretty sure I am using an EGL backend since at run-time the logs say "Using Wayland-EGL".
Why qEglContext.display() seems to be invalid?