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

MouseDoubleClick implementation in QRubberBand subclass



  • Hello,

    I made a custom class inheriting from QRubberBand because I would like to add some functionality. So far what I have now is I click and drag on my view and a the rectangle appears which is the rubberband. When I release the mouse the rectangle stays there on the view. I would like to now be able to double click anywhere inside the rubberband rectangle and have that do something later on.

    But now it doesn't seem to be working. I added some debug lines inside my mouseDoubleClick event to see if I get something in the terminal, but it never goes inside the function. When I double click inside the rectangle I previously drew (which is the rubberband), it just disappears. How could I fix this problem to add functionality when someone double clicks on inside the rubberband boundaries??

    Thanks!


Log in to reply