What is the best (as in simplest) way to obtain the pos of a mousePressedEvent in a QLabel? (Or basically just obtain the location of a mouse click
pos
mousePressedEvent
I had the same problem
invalid static_cast...
I just forgot to include the header: #include "qevent.h"
#include "qevent.h"
Now everything is working well.