diff --git a/src/qt/dialog.cpp b/src/qt/dialog.cpp index f19fd41f63..fc9fcaba4f 100644 --- a/src/qt/dialog.cpp +++ b/src/qt/dialog.cpp @@ -59,7 +59,16 @@ bool wxDialog::Create( wxWindow *parent, wxWindowID id, // all dialogs should have tab traversal enabled style |= wxTAB_TRAVERSAL; - m_qtWindow = new wxQtDialog( parent, this ); + m_qtWindow = new wxQtDialog(parent, this); + + // Qt adds the context help button by default and we need to explicitly + // remove it to avoid having it if it's not explicitly requested. + if ( !HasExtraStyle(wxDIALOG_EX_CONTEXTHELP) ) + { + Qt::WindowFlags qtFlags = m_qtWindow->windowFlags(); + qtFlags &= ~Qt::WindowContextHelpButtonHint; + m_qtWindow->setWindowFlags(qtFlags); + } if ( !wxTopLevelWindow::Create( parent, id, title, pos, size, style, name ) ) return false;