diff --git a/src/qt/frame.cpp b/src/qt/frame.cpp index 7817d7418c..4944181f22 100644 --- a/src/qt/frame.cpp +++ b/src/qt/frame.cpp @@ -127,27 +127,11 @@ void wxFrame::SetWindowStyleFlag( long style ) Qt::WindowFlags qtFlags = GetHandle()->windowFlags(); - wxCHECK_RET( !HasFlag( wxFRAME_FLOAT_ON_PARENT ) && !HasFlag( wxTINY_CAPTION ) , - "wxFRAME_FLOAT_ON_PARENT, wxTINY_CAPTION not supported. Use wxFRAME_TOOL_WINDOW instead." ); - wxCHECK_RET( !HasFlag( wxFRAME_TOOL_WINDOW ) || HasFlag( wxFRAME_NO_TASKBAR ) , - "wxFRAME_TOOL_WINDOW without wxFRAME_NO_TASKBAR not supported." ); - if ( HasFlag( wxFRAME_TOOL_WINDOW ) ) { qtFlags &= ~Qt::WindowType_Mask; qtFlags |= Qt::Tool; } - else if ( HasFlag( wxFRAME_NO_TASKBAR ) ) - { - qtFlags &= ~Qt::WindowType_Mask; - qtFlags |= Qt::Dialog; - } - - if ( ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) ) - != qtFlags.testFlag( Qt::FramelessWindowHint ) ) - { - qtFlags ^= Qt::FramelessWindowHint; - } GetHandle()->setWindowFlags( qtFlags ); } diff --git a/src/qt/window.cpp b/src/qt/window.cpp index a39a37540c..31969dc9f3 100644 --- a/src/qt/window.cpp +++ b/src/qt/window.cpp @@ -719,6 +719,26 @@ void wxWindowQt::SetWindowStyleFlag( long style ) // qtFrame->setFrameStyle( QFrame::StyledPanel ); // qtFrame->setFrameShadow( QFrame::Plain ); // } + + Qt::WindowFlags qtFlags = GetHandle()->windowFlags(); + + if ( HasFlag( wxFRAME_NO_TASKBAR ) ) + { +// qtFlags &= ~Qt::WindowType_Mask; + if ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) ) { + qtFlags = Qt::ToolTip | Qt::FramelessWindowHint; + } + else + qtFlags |= Qt::Dialog; + } + else + if ( ( (style & wxSIMPLE_BORDER) || (style & wxNO_BORDER) ) + != qtFlags.testFlag( Qt::FramelessWindowHint ) ) + { + qtFlags ^= Qt::FramelessWindowHint; + } + + GetHandle()->setWindowFlags( qtFlags ); } void wxWindowQt::SetExtraStyle( long exStyle )