Details
-
Bug
-
Resolution: Fixed
-
P1: Critical
-
6.5.3, 6.6.0
-
None
-
-
bed9ed55c (12.0), 2d59f2e8c (dev), a69980e55 (6.6), 95bda90a4 (tqtc/lts-6.5)
Description
Create a message box with two buttons, add a menu to one of the buttons
auto *b = new QMessageBox; auto button = b->addButton("Open", QMessageBox::AcceptRole); b->addButton("Cancel", QMessageBox::RejectRole); auto menu = new QMenu; menu->addAction("Foo"); menu->addAction("Bar"); button->setMenu(menu); b->show();
Expected: A message box opens with two buttons, one button with a menu that opens when I click the button without (yet) closing the message box.
Actual: A message box opens with two buttons without menu, after clicking the "Open" button the message box closes and the menu appears "out of nothing".
I'm aware that macOS native dialogs probably do not support this, but then Qt should automatically switch to a non-native dialog.
This breaks existing application logic.
Attachments
Issue Links
- relates to
-
QTBUG-118241 QMessageBox::button(QMessageBox::Close)->setText() does not work
-
- Closed
-