Merge pull request #2838 from BaraMGB/2823
makes Subwindow title label transparent for mouse events
This commit is contained in:
@@ -51,24 +51,32 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) :
|
||||
m_closeBtn = new QPushButton( embed::getIconPixmap( "close" ), QString::null, this );
|
||||
m_closeBtn->resize( m_buttonSize );
|
||||
m_closeBtn->setFocusPolicy( Qt::NoFocus );
|
||||
m_closeBtn->setCursor( Qt::ArrowCursor );
|
||||
m_closeBtn->setAttribute( Qt::WA_NoMousePropagation );
|
||||
m_closeBtn->setToolTip( tr( "Close" ) );
|
||||
connect( m_closeBtn, SIGNAL( clicked( bool ) ), this, SLOT( close() ) );
|
||||
|
||||
m_maximizeBtn = new QPushButton( embed::getIconPixmap( "maximize" ), QString::null, this );
|
||||
m_maximizeBtn->resize( m_buttonSize );
|
||||
m_maximizeBtn->setFocusPolicy( Qt::NoFocus );
|
||||
m_maximizeBtn->setCursor( Qt::ArrowCursor );
|
||||
m_maximizeBtn->setAttribute( Qt::WA_NoMousePropagation );
|
||||
m_maximizeBtn->setToolTip( tr( "Maximize" ) );
|
||||
connect( m_maximizeBtn, SIGNAL( clicked( bool ) ), this, SLOT( showMaximized() ) );
|
||||
|
||||
m_minimizeBtn = new QPushButton( embed::getIconPixmap( "minimize" ), QString::null, this );
|
||||
m_minimizeBtn->resize( m_buttonSize );
|
||||
m_minimizeBtn->setFocusPolicy( Qt::NoFocus );
|
||||
m_minimizeBtn->setCursor( Qt::ArrowCursor );
|
||||
m_minimizeBtn->setAttribute( Qt::WA_NoMousePropagation );
|
||||
m_minimizeBtn->setToolTip( tr( "Minimize" ) );
|
||||
connect( m_minimizeBtn, SIGNAL( clicked( bool ) ), this, SLOT( showMinimized() ) );
|
||||
|
||||
m_restoreBtn = new QPushButton( embed::getIconPixmap( "restore" ), QString::null, this );
|
||||
m_restoreBtn->resize( m_buttonSize );
|
||||
m_restoreBtn->setFocusPolicy( Qt::NoFocus );
|
||||
m_restoreBtn->setCursor( Qt::ArrowCursor );
|
||||
m_restoreBtn->setAttribute( Qt::WA_NoMousePropagation );
|
||||
m_restoreBtn->setToolTip( tr( "Restore" ) );
|
||||
connect( m_restoreBtn, SIGNAL( clicked( bool ) ), this, SLOT( showNormal() ) );
|
||||
|
||||
@@ -80,6 +88,7 @@ SubWindow::SubWindow( QWidget *parent, Qt::WindowFlags windowFlags ) :
|
||||
|
||||
m_windowTitle = new QLabel( this );
|
||||
m_windowTitle->setFocusPolicy( Qt::NoFocus );
|
||||
m_windowTitle->setAttribute( Qt::WA_TransparentForMouseEvents, true );
|
||||
m_windowTitle->setGraphicsEffect( m_shadow );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user