Add note to QMessageBox::button() about modifying returned button
We don't have a good way to detect whether the button is modified or not, to bail out of using the native dialog helpers. Document that this API shouldn't be used to modify the standard buttons (they are standard after all), and recommend the explicit APIs for adding custom buttons instead. Fixes: QTBUG-112525 Change-Id: I38c8ef5e1717a85f0db59c9e705d0775982ffb57 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit e9a1c53214d3936721e00bebbdc1e949e10658dd) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
259b3148ab
commit
eb5f183754
@ -1007,6 +1007,12 @@ QMessageBox::StandardButton QMessageBox::standardButton(QAbstractButton *button)
|
||||
Returns a pointer corresponding to the standard button \a which,
|
||||
or \nullptr if the standard button doesn't exist in this message box.
|
||||
|
||||
\note Modifying the properties of the returned button may not be reflected
|
||||
in native implementations of the message dialog. To customize dialog
|
||||
buttons add a \l{addButton(QAbstractButton *button, QMessageBox::ButtonRole role)}
|
||||
{custom button} or \l{addButton(const QString &text, QMessageBox::ButtonRole role)}
|
||||
{button title} instead, or set the \l Option::DontUseNativeDialog option.
|
||||
|
||||
\sa standardButtons, standardButton()
|
||||
*/
|
||||
QAbstractButton *QMessageBox::button(StandardButton which) const
|
||||
|
Loading…
x
Reference in New Issue
Block a user