If you are using my example download the attachment then select the function that has the example code in it . Click resources button on qm main window then on resources dialog click add then import from file then scan code should work
download this
download this