For those who need to work this job out, you can just use:
@
int idle = inhibit ? SCREEN_IDLE_MODE_KEEP_AWAKE : SCREEN_IDLE_MODE_NORMAL;
screen_set_window_property_iv((screen_window_t)myWinId, SCREEN_PROPERTY_IDLE_MODE, &idle);
@
myWinId is just a QWindow's function (inherited by QQuickWindow, QmlApplicationViewer and so on...)