QList<QMdiSubWindow > subWindows = ui->mdiArea->subWindowList(); QMdiSubWindow mySubWindow = subWindows.at(0); mySubWindow->setWindowIcon(QIcon());