Reimplement the resizeEvent