Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-43615

Calling setStandardButtons() from a slot connected to QDialogButtonBox::clicked arbitrarily triggers accept/reject

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Not Evaluated Not Evaluated
    • None
    • 5.2.1
    • None
    • Ubuntu 14.04.1 LTS, KDE 4.13.3

      Assume a dialog with a QDialogButtonBox on it.
      The dialog button box' reject() and accept() signals are connected to the respective slots of the dialog.
      Then, changing the standard buttons of the dialog button box via setStandardButtons() from a slot that is connected to the dialog button box' clicked() slot randomly triggers reject and/or accept signals.

      In the attached example, clicking on the 'Reset' button sometimes closes the dialog, which should obviously not happen. Sometimes means, this may happen at the first click or after clicking wildly. Sometimes it also does not happen at all, but after restarting the example it may happen again. Supposedly there is some non-deterministic influence, maybe the order that events are processed.

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

            mmutz Marc Mutz
            kamajii Sven Pauli
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes