gui/gui.py
def browse_file(self, label, file_filter):
        """Opens a browse menu to select a file."""
              
        # Opens browse menu with the last used file path selected (if it exsits)
        file_name = QFileDialog.getOpenFileName(
            self, 
            "Browse", 
            self.default_folder,
            file_filter
        )

        # Store last used path for next open
        if file_name[0] != "":
            self.default_folder = QFileInfo(file_name[0]).path()
            self.selected_file = file_name[0]
            getattr(self.ui, label).setText(file_name[0])
Opens a browse menu to select a file.
Opens a browse menu to select a file.
Opens a browse menu to select a file .
def browse_file(self, label, file_filter):
        file_name = QFileDialog.getOpenFileName(
            self, 
            "Browse", 
            self.default_folder,
            file_filter
        )
        if file_name[0] != "":
            self.default_folder = QFileInfo(file_name[0]).path()
            self.selected_file = file_name[0]
            getattr(self.ui, label).setText(file_name[0])
def browse_file ( self , label , file_filter ) : file_name = QFileDialog . getOpenFileName ( self , "Browse" , self . default_folder , file_filter ) if file_name [ 0 ] != "" : self . default_folder = QFileInfo ( file_name [ 0 ] ) . path ( ) self . selected_file = file_name [ 0 ] getattr ( self . ui , label ) . setText ( file_name [ 0 ] )
Opens a browse menu to select a file.
Opens a browse menu to select a file .
"""Opens a browse menu to select a file.""" # Opens browse menu with the last used file path selected (if it exsits) # Store last used path for next open
self
label
file_filter