Using QMenu(view) to create the menu and recursive function