You must set backgrounds and main windows with this: setAttribute(Qt::WA_Maemo5StackedWindow); If it doesn't work, the change background windows from QMainWindow to QDialog.
newWin = new backgrounds(this); newWin->setAttribute(Qt::WA_Maemo5StackedWindow); newWin->setAttribute(Qt::WA_DeleteOnClose); newWin->show();