When you're ready to leave, ask for the check with a conta por favor. In a busy, loud restaurant, getting yourself heard might be hard. In those situations, signal the waiter and pretend you're holding a pen and writing in the air. They will immediately understand you want the check.