def on_open(self):
        """
        Shows an open file dialog and open the file if the dialog was
        accepted.

        """
        filename, filter = QtWidgets.QFileDialog.getOpenFileName(
            self, _('Open'))
        if filename:
            self.open_file(filename)
def on_open ( self ) : filename , filter = QtWidgets . QFileDialog . getOpenFileName ( self , _ ( 'Open' ) ) if filename : self . open_file ( filename )
Shows an open file dialog and open the file if the dialog was
        accepted.