One minor change, otherwise it's all good.
Lets avoid this.
Firstly it messes with Qt. We're doing this potentially during platform window initialisation, we're potentially committing before it's set some super important properties that we need set on the first commit.
Secondly, we want it atomic with when the window updates (to a new theme or whatever) anyway.
window->requestUpdate(); would be a compromise, it'll make Qt do a commit at the next available time.