Is there a way to call the clip function in QQGIS from the python console? It is found under geoprocessing tools in the vector menu.
Sure You can get the function from the processing toolbox. Here's how to use it: As per http://qgis.org/de/docs/user_manual/processing/console.html
From the console you can get a list of all the algorithms available which contain the word "clip" by typing:
Then you could find out how to use what appears the most appropriate function with:
Then simply use the algorithm in your script as follows:
Note: The algorithm will work only on slected features"
Assuming that you have a layer called "overlay" and another one called "layer_to_clip" loaded.