I'm trying to change the default QGIS scale bar from meters to feet. From the API documentation it looks like I should be able to use the QgsComposerScaleBar.applyDefaultSize() function.
I thought this would work
scalebar = QgsComposerScaleBar(c)
scalebar.setComposerMap(composerMap)
feet = QgsComposerScaleBar.ScaleBarUnits.Feet
scalebar.applyDefaultSize(feet)
c.addItem(scalebar)
but I get the error
Object::disconnect: No such signal QObject::extentChanged()
Any ideas on how to do this, or what this error means?
I'm using QGIS 2.6.1-Brighton and the CRS for my dataset is EPSG:26917 - NAD83 / UTM zone 17N.
scalebar.applyDefaultSize(QgsComposerScaleBar.Feet)
orscalebar.setUnits(QgsComposerScaleBar.Feet)
?