Can not catch none client area mouse event in linux platform



  • Hi,
    I want to catch none client area mouse event in a widget derived from QWidget. But it does not work.
    The code is :

    class Widget :public QWidget
    {
    Widget(){}
    bool DocWidget::event(QEvent *e)
    {
    if(e->type() == QEvent::NonClientAreaMouseButtonRelease)
    std::cout<<"non client area mouse btn released"<<std::endl;

    if(e->type() == QEvent::NonClientAreaMouseButtonPress)
    std::cout<<"non client area mouse btn pressed"<<std::endl;
    return QWidget::event(e);
    }

    }


  • Lifetime Qt Champion

    Hi and welcome to devnet,

    Are you in this case ?


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.