PDA

View Full Version : Showing a message dialog from an application running in fullscreen



AndresBarbaRoja
24th January 2012, 09:29
Good day,
I have an application running in fullscreen mode. This application displays errors on a separate dialog, but hen the dialog is displayed the OS (it only runs on linux) menu bars are displayed.
Is there a way to avoid this situation?

To display dialogs I use:

void ErrorWindow::notifyError(const QString &msg)
{

if (errWind.isNull()) //All errors are displayed on a single message box as long as the message box exists.
{
errWind= new QMessageBox;
errWind->resize(500, 200);
errWind->setModal(false);
errWind->setText("Errors have been found. Press show details to review the error list ");
connect(errWind.data(),SIGNAL(buttonClicked(QAbstr actButton*)),this,SLOT(clearErrors(QAbstractButton *)));
}
QString errtxt;
if(messages<100)
{
errtxt = errWind->detailedText();
messages++;
}
else
{
errtxt = "";
messages=1;
}
errtxt.prepend(QString("%1:%2\n").arg(QDateTime::currentDateTime().toString(DATETI ME_FORMAT)).arg(msg));
errWind->setDetailedText(errtxt);
errWind->show();
}

Thanks in advance.

Spitfire
25th January 2012, 10:21
I'm not quite sure what you mean by 'menu bars'?

Anyway, try parenting the dialog to the main window rather than creating it 'hanging' around.

AndresBarbaRoja
25th January 2012, 19:55
That worked, thanks!