I want to use QWebPage in an application other than the Qt GUI. By this I mean that I generally do not want to communicate with the window server. However, using QtGui is not a problem.
QWebPage internally creates multiple QWidget instances. Therefore, using QCoreApplication not possible.
When creating the QApplication instance, although I already got the MacOSX dock icon right away. And I do not want this. It also means that it is somehow registered with Cocoa as a graphical application.
My question is not only for Mac. I would like to know if there is an βofficialβ way for Qt to do this. Only if this does not happen, I would like to know specific ways to do this, for example. on the Mac at the moment.
Somewhat more specifically about the Mac:
There is also the LSBackgroundOnly property, which can be set for the application package and which goes in the direction of what I want (whereby I'm still not sure if it really is a console, for example, it will also work without Quartz, etc.) . However, I do not have an application package; it's just a simple binary (which will be used as a command line in shells).
Right now I have a little workaround to hide the dock icon, but it's pretty ugly as it first appears and then goes forward: (Python code, but that doesn't really matter ...)
def hideMacDockIcon():
Also, I'm not sure if it also works in other environments, perhaps as a system daemon or so.
source share