but drawContents called automatically.
yes. So call resizeContents in function where you get your pixmap.