Results 1 to 5 of 5

Thread: "Do not show this message again" functionality in Message Boxes

  1. #1
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default "Do not show this message again" functionality in Message Boxes

    Hi

    I've read that Qt supports message boxes which supports a "Do not show this message again" check box. I've checked the QMessageBox class reference but it does not seems to have information on this topic.

    Does anyone have a reference that explains how this works?

    Thanks in advance
    Jaco

  2. #2
    Join Date
    Aug 2008
    Location
    Ukraine, Krivoy Rog
    Posts
    1,963
    Thanked 370 Times in 336 Posts
    Qt products
    Qt3 Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: "Do not show this message again" functionality in Message Boxes

    do you mean this widget QErrorMessage?

  3. #3
    Join Date
    Aug 2008
    Posts
    132
    Thanks
    23
    Thanked 3 Times in 3 Posts

    Default Re: "Do not show this message again" functionality in Message Boxes

    I wasn't aware of the QErrorMessage class... Thanks.

    I guess this "do not show again" functionality is not available to custom user generated QMessageBox messages? I'm planning to implement my own message handler class which keeps track of which messages needs to be shown or not. I thought that it's worthwhile to investigate if this functionality was already available.

    Thanks for the help. I'll implement my own class to manage showing or not showing of message boxes.

    Jaco

  4. #4
    Join Date
    Jan 2006
    Location
    Germany
    Posts
    4,380
    Thanks
    19
    Thanked 1,005 Times in 913 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows Symbian S60
    Wiki edits
    5

    Default Re: "Do not show this message again" functionality in Message Boxes

    Hi,

    just use QSettings and store a bool value for each dialog, if it should be displayed again or not.


    Lykurg

    Edit: If the value should only stored for the lifetime of the application use a static "QHash<QString> doNotShow" as QErrorMessage does.
    Last edited by Lykurg; 8th October 2008 at 14:20.

  5. #5
    Join Date
    Feb 2006
    Location
    Oslo, Norway
    Posts
    6,264
    Thanks
    36
    Thanked 1,519 Times in 1,389 Posts
    Qt products
    Qt4
    Platforms
    MacOS X Unix/X11 Windows Symbian S60 Maemo/MeeGo

    Default Re: "Do not show this message again" functionality in Message Boxes

    J-P Nurmi

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.