Results 1 to 3 of 3

Thread: Multiple Message Boxes

  1. #1
    Join Date
    Feb 2010
    Posts
    52
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default Multiple Message Boxes

    Theres probably many ways of solving this problem, but I'm wondering what is considered 'best practice' or a good design pattern.

    Consider a GUI doing various tasks in background, any of which could error and you want to display a messagebox to the user. Obviously you cant have multiple modal windows, so what is the best way to handle the situation where several of your threads have errored ? (or even the scenario where the GUI is currently displaying another modal dialog, and a thread errors and wants to show a message) ?

  2. #2
    Join Date
    Sep 2009
    Location
    Wroclaw, Poland
    Posts
    1,394
    Thanked 342 Times in 324 Posts
    Qt products
    Qt4 Qt5
    Platforms
    MacOS X Unix/X11 Windows Android

    Default Re: Multiple Message Boxes

    I would probably have one window for error reporting, and connect error signals of worker threads to one slot in main thread with QueuedConnection, so all incoming error messages would be appended and displayed in one window instead of multiple popups. Imagine that you need to click 6+ times in a row because some worker threads reported errors, IMHO better approach is to display them all in single (maybe list) widget.

  3. #3
    Join Date
    Feb 2010
    Posts
    52
    Thanks
    6
    Thanked 2 Times in 2 Posts

    Default Re: Multiple Message Boxes

    Sounds reasonable to me, cheers.

Similar Threads

  1. Replies: 1
    Last Post: 29th June 2010, 17:59
  2. Replies: 0
    Last Post: 4th May 2010, 07:49
  3. How to show Multiple Message using QSystemTrayIcon?
    By ashukla in forum Qt Programming
    Replies: 5
    Last Post: 22nd May 2009, 10:26
  4. Replies: 4
    Last Post: 12th October 2008, 13:47
  5. Single slot for multiple list boxes
    By Sheetal in forum Qt Programming
    Replies: 1
    Last Post: 15th April 2008, 06:53

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.