Don't show context help button by default in wxQt dialogs
Only show it if wxDIALOG_EX_CONTEXTHELP was explicitly specified for consistency with the other ports. Closes https://github.com/wxWidgets/wxWidgets/pull/1382
This commit is contained in:
committed by
Vadim Zeitlin
parent
ab553cd6db
commit
07c6c61b2c
@@ -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;
|
||||
|
Reference in New Issue
Block a user