I’m working on a large project that uses Qt. The application has the option of running both in GUI or batch modes, and I don’t have access to that info where I am at.
But, I do have access to the QApp. Is there a way to know through Qt if an UI exists or has been initialized?
QApplicationhas atopLevelWidgets()function that returns a list of top-level widgets. You could check if that list is empty or not.