我有一个 QWidget,它在 show 事件上显示一个 QMessageBox。我已经覆盖了 QWidget 的 showEvent 函数。问题是,消息框首先显示,小部件的其余部分稍后显示。我该如何解决这个问题?
void InstallScreen::showEvent( QShowEvent *s )
{
QMessageBox::about( m_main, "One Click Installer",
QString( "The following repositories will be added \n %1" ).arg( repoList ) );
QMessageBox::about( m_main, "One Click Installer",
QString( "The following packages will be installed \n %1" ).arg( packList ) );
}