Disable Qt's automatic "auto default" state for buttons

Let the wx layer handle default-ness, as the auto behaviour has unhappy
consequences that can't be controlled via the wx API. (For example, a
Delete button being considered default simply because it's the first
button in the dialog.)

Closes https://github.com/wxWidgets/wxWidgets/pull/1366
This commit is contained in:
Jay Nabonne
2019-06-20 12:02:12 +01:00
committed by Vadim Zeitlin
parent 9a64acbb79
commit fcd6ee5324

View File

@@ -85,8 +85,9 @@ wxAnyButton::wxAnyButton() :
void wxAnyButton::QtCreate(wxWindow *parent) void wxAnyButton::QtCreate(wxWindow *parent)
{ {
// create the default push button (used in button and bmp button) // create the basic push button (used in button and bmp button)
m_qtPushButton = new wxQtPushButton( parent, this ); m_qtPushButton = new wxQtPushButton(parent, this);
m_qtPushButton->setAutoDefault(false);
} }
void wxAnyButton::QtSetBitmap( const wxBitmap &bitmap ) void wxAnyButton::QtSetBitmap( const wxBitmap &bitmap )