That's not legal C++; you don't pass types as function parameters, only variables. You could probably build a QMouseEvent and pass it on, but I doubt that would work as you intend it to.
Most UI libraries have a way to queue new events, I'd assume Qt is no different. I don't know how though and again, I doubt that's what you want anyway.
IMNSHO, this is an incorrect use of the event system. Your linedrawer() function should be constructing something to tell some object to draw a line, something that would also be constructed by the event system when user interaction would result in the same outcome.
Bookmarks