'Select a filename using a Save file dialog.'

def browse(self):

    if (self.filename is None):
        startdir = stdpaths.Documents
    else:
        startdir = os.path.dirname(self.filename)
    (filename, _) = QFileDialog.getSaveFileName(self, self.tr('Save'), directory=startdir, filter=self.FILTER)
    if filename:
        if (not filename.endswith(self.FILE_EXT)):
            filename += self.FILE_EXT
        if (self.model is not None):
            self.save(filename)
        else:
            self._remember(filename)
