Details
-
Bug
-
Resolution: Unresolved
-
P1: Critical
-
None
-
5.15.1, 6.0.0
-
None
-
Windows 10
Description
Assigning roles to QMessageBox buttons depends on particular order. In the attached case two buttons are created: first one accepts window closing, second one rejects it.
In one particular order case "yes" button works as "no", but just switching the order of lines it starts working properly.
// Correct case msg.addButton("No 1", QMessageBox::RejectRole); msg.addButton("Yes 1", QMessageBox::AcceptRole);
// Wrong case msg.addButton("Yes 2", QMessageBox::AcceptRole); msg.addButton("No 2", QMessageBox::RejectRole);
The full project is attached.