(standalone app) minimise at startup?

Hi all, we’re working on a standalone app and would like it to be minimised when it starts (based on some input argument).

I tried calling DocumentWindow::setMinimised (true) early on in the startup code which almost works but it’s not ideal, as we first see the window being created and then after a moment it goes minimised.

What we’d like is for the app to be already minimised as it starts, without even showing the window…

Is that even possible? Any thoughts?

PS: I’m currently working on Mac but obviously it should work on Windows too.

Thanks!! :slight_smile:

maybe setVisible(false) ? at startup, then setVisible(true) after minimising

Yeah this sounds like the right logic, but doesn’t seem to work unfortunately.
Chat GPT suggests following the same idea but using some platform-dependent code.
I’m giving it a go to see if it works.

1 Like