Here is how I got this to work:
link the following matlab libs:

LIBS += -L "c:/Program Files/MATLAB/R2007b/bin/win32" \
-leng -lmat -lmex -lmwblas -lmwlapack -lmwmathutil -lmx -ldfblas -ldflapack

Then in your program, invoke the engine like so:
Qt Code:
  1. #include <engine.h>
  2. ....
  3. Engine *ep = engOpen(NULL);
  4. QString tmp = QString("numcycles = 0;");
  5. engEvalString(ep,tmp.toStdString().c_str());
To copy to clipboard, switch view to plain text mode 

you can also work with arrays and variables - consult the matlab documentation and search for engGetVariable and engPutVariable

good luck