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
Post a Comment