connect to resized signal of QDesktopWidget. Obtain a pointer to QDesktopWidget object from QApplication::desktop() function