Hi,
There are in principle two ways you can do this:
1. Change the nlpsol plugin to "sqpmethod" and use "osqp" or "qrqp" as the QP solver. This gives a toolchain that can be generated to C code, including a MEX interface, and that can be called directly from MATLAB. This is probably the easiest way, if you can get it to work.
2. From CasADi/MATLAB, generate C code for the functions needed by the solver, including Jacobian and Hessian information. These can then be interfaced directly in C/C++. There should be an example called "embeddable_codegen" in the CasADi repo demonstrating this. This is something that you can get working with e.g. IPOPT as a solver.
Best regards,
Joel