m_label = new QLabel(); ui->stackedWidget->addWidget(m_label); ui->stackedWidget->setCurrentWidget(m_label); ui->stackedWidget->removeWidget(m_label); m_label->setWindowFlags(Qt::Window); m_label->setScaledContents(true); m_label->showFullScreen();
m_label->setWindowFlags(Qt::Window);
这个语句很重要。