I want to add a new feature with the Add Feature button in the Attribute Table using one line of PyQGIS.
I can show the attribute table via
Is there not a method like
EDIT: The table I'm adding features to has optional geometry. When geometry is needed directly in the table, the standard Add Feature from the Edit menu works fine: the feature is digitized in and then the attribute edit dialog comes up. But in other cases the geometry is going to be referenced from another table, so I want the attribute edit dialog to come up first, as happens when the Add feature button is selected from a showAttributeTable call.