Results 1 to 3 of 3

Thread: Showing a message dialog from an application running in fullscreen

  1. #1
    Join Date
    Mar 2011
    Posts
    23
    Thanks
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Showing a message dialog from an application running in fullscreen

    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:
    Qt Code:
    1. void ErrorWindow::notifyError(const QString &msg)
    2. {
    3.  
    4. if (errWind.isNull()) //All errors are displayed on a single message box as long as the message box exists.
    5. {
    6. errWind= new QMessageBox;
    7. errWind->resize(500, 200);
    8. errWind->setModal(false);
    9. errWind->setText("Errors have been found. Press show details to review the error list ");
    10. connect(errWind.data(),SIGNAL(buttonClicked(QAbstractButton*)),this,SLOT(clearErrors(QAbstractButton*)));
    11. }
    12. QString errtxt;
    13. if(messages<100)
    14. {
    15. errtxt = errWind->detailedText();
    16. messages++;
    17. }
    18. else
    19. {
    20. errtxt = "";
    21. messages=1;
    22. }
    23. errtxt.prepend(QString("%1:%2\n").arg(QDateTime::currentDateTime().toString(DATETIME_FORMAT)).arg(msg));
    24. errWind->setDetailedText(errtxt);
    25. errWind->show();
    26. }
    To copy to clipboard, switch view to plain text mode 

    Thanks in advance.

  2. #2
    Join Date
    Sep 2011
    Location
    Manchester
    Posts
    538
    Thanks
    3
    Thanked 106 Times in 103 Posts
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Showing a message dialog from an application running in fullscreen

    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.

  3. The following user says thank you to Spitfire for this useful post:

    AndresBarbaRoja (25th January 2012)

  4. #3
    Join Date
    Mar 2011
    Posts
    23
    Thanks
    6
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Showing a message dialog from an application running in fullscreen

    That worked, thanks!

Similar Threads

  1. Running new application from a dialog
    By kpr in forum Qt Programming
    Replies: 1
    Last Post: 24th February 2011, 14:41
  2. Action Icons not showing when running app
    By jimmydean101 in forum Newbie
    Replies: 4
    Last Post: 14th February 2011, 15:35
  3. Showing a error message
    By srohit24 in forum Qt Programming
    Replies: 2
    Last Post: 21st August 2009, 07:05
  4. Showing a dialog at application startup
    By PaladinOfKaos in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2008, 20:05
  5. PopUp a Menu when showing FullScreen
    By Lele in forum Qt Programming
    Replies: 2
    Last Post: 29th May 2007, 10:04

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.