Results 1 to 14 of 14

Thread: Slot function's concurrent multiple executions

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    Join Date
    Jan 2015
    Posts
    6
    Qt products
    Qt5

    Default Re: Slot function's concurrent multiple executions

    Thanks for the reply. I tried two things: First as you suggested setDisabled/setEnabled and second disconnecting the signal-slot on entry and reconnecting on exit. These seem to work but I think there will be a race condition in both these solutions? One scenario for such a race is: first two clicks were so fast that both the slots were entered before the first one could complete the execution of setDisabled or disconnect.

    The QT documentation says "The about box has a single button labelled "OK". On Mac OS X, the about box is popped up as a modeless window; on other platforms, it is currently application modal.". I think for android also it should be application modal as only for OS X they have specifically mentioned it. Assuming that it is application modal, (as when the about box is displayed, I am not able to give input to the main window until I close the about box) I think what is happening is that before the first about message box is in displayed, the second click is already initiated causing another box to popup. order of events first_click->second_click->slot1->slot2. So even if I use an application modal dialog, the same issue may come up? ... Secondly, using the same code I am not able to reproduce the issue on Windows, I m not sure why.
    Last edited by MavenTux; 13th February 2015 at 21:10.

Similar Threads

  1. Replies: 2
    Last Post: 26th October 2013, 05:40
  2. Replies: 2
    Last Post: 26th August 2011, 08:51
  3. Replies: 4
    Last Post: 14th August 2011, 15:37
  4. My Slot Function
    By qtoptus in forum Qt Programming
    Replies: 3
    Last Post: 3rd November 2010, 16:38
  5. slot control of new function
    By tommy in forum Qt Programming
    Replies: 3
    Last Post: 11th November 2007, 03:58

Tags for this Thread

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
  •  
Qt is a trademark of The Qt Company.