def METHOD_NAME(self, event):
    # Position popup based on contents on show event
    geo = self.calculate_window_geometry()
    self.setGeometry(geo)
    return super(Popup, self).METHOD_NAME(event)