Added showEvent method