<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def setup(self, name_filters=['*.py', '*.pyw'], show_all=False,
 single_click_to_open=False):

 """Setup tree widget"""

        self.setup_view()

        self.set_name_filters(name_filters)
        self.show_all = show_all
        self.single_click_to_open = single_click_to_open
        
        # Setup context menu
        self.menu = QMenu(self)
        self.common_actions = self.setup_common_actions()