I'm trying to select and zoom on selected features on standalone QGis application. Selection seems to work, console shows me list of selected items and they are exactly I expected.
ids =  for f in kt.getFeatures(): if f['KatastriNumber']==k_n: ids.append(f.id) print f['eraldus'] kt.setSelectedFeatures(ids)
But zooming to selection does not work. I have tried many code samples i found from internet. None of them doesnt zoom to selected. Can only zoom to entire layer with:
I tried to make a box with command:
box = kt.boundingBoxOfSelected() canvas.setExtent(box)
This gives no result.Then I tried with command
also no result. How to tell app that some features from layer are selected?