c++ - Should my schizophrenic console/gui Qt5 program use QApplication or QCoreApplication? -


my program either open gui or not depending on commandline parameters. right instantiating qapplication main event loop, noticed program aborts when run headless machine (missing xorg/xcb) unless specify environment variables trick believing there xorg running.

when instead instantiate qcoreapplication don't have access activewindow(). code requiring activewindow() never run in cases when program run headless (that purose of commandline parameters).

so asking is, possible make qapplication run without problems on headless machine, , not show gui?

what other options?

no, not possible. can create qcoreapplication or qapplication in dependent command line args.


Comments

Popular posts from this blog

OpenCV OpenCL: Convert Mat to Bitmap in JNI Layer for Android -

android - org.xmlpull.v1.XmlPullParserException: expected: START_TAG {http://schemas.xmlsoap.org/soap/envelope/}Envelope -

python - How to remove the Xframe Options header in django? -