Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

Mouse events overwrite question



  • Hi everyone. I have a liitle dilema.
    I need to know when the user have ended the resize event (have released the mouse after a resize) and I use a QSizeGrip for the resize. Now I can overwrite the mouse events of the QSizeGrip and send a signal to the parrent with a simple bool pressed/released. But when I overwrite the mouse events I also lose the ability to resize the window (make sence because I have "steal" the mouse events from the widgets default actions). But my qestion is now this: how I can overwrite the events but also keep the original actions? Is it possible or not?



  • Just call the parent implementation in your own implementation!

    @void DerivedClass::someEvent(QEvent *e)
    {
    //Do your own handling here...
    [.....]

    //Finally call parent implementation
    BaseClass::someEvent(e);
    

    }@



  • Ah of course!! Thank you very much for the fast reply!!!


Log in to reply