A new method for determining the quark-gluon vertex