While I never managed to do it this way, I came up with a working solution.

void Wremote::mClick(int x, int y ) { QTest::mouseClick(_mwindow,Qt::LeftButton,0,QPoint(x,y),-1); }