Dispatch QML method calls properly.

This was submitted on #12, but after a good while the
details were not sorted out, so here it goes.