is it possible to change the color of a selected feature in qgis 1.8? To highlight a feature I use:

box = vlayer.boundingBoxOfSelected()

But the selected featue is colored yellow. Is it possible to define for example a red color for this feature?

1 Answer 1


For reference, if you use QGIS >= v.2.4, you can set the selection color from the QGIS Python console in this way:

from PyQt4.QtGui import QColor
iface.mapCanvas().setSelectionColor( QColor("red") )

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.