in der Dokumentation steht The global qApp pointer refers to this application object.
Ich hatte das so interpretiert, dass ich ÜBERALL auf qApp zugreifen kann (btw.: was sind globale Pointer, wusste gar nicht, dass es sowas gibt...), was aber anscheinend nicht der Fall ist:
qApp
A global pointer referring to the unique application object. It is equivalent to the pointer returned by the QCoreApplication::instance() function.
Only one application object can be created.
See also QCoreApplication::instance()
Somit solltest du erfolgreich sein, wenn du QCoreApplication includest.
Wenn du in deiner main-Schleife eine QApplication verwendest, geht das natürlich auch.
qApp
A global pointer referring to the unique application object. It is equivalent to the pointer returned by the QCoreApplication::instance() function.
Only one application object can be created.
See also QCoreApplication::instance()
Somit solltest du erfolgreich sein, wenn du QCoreApplication includest.
Wenn du in deiner main-Schleife eine QApplication verwendest, geht das natürlich auch.
mache, dann kann ich auch auf qApp zugreifen. (Ansonsten "nur" über die von dir erwähnte instance() Funktion). War mir nicht klar, dass ich das muss, aber im Nachhinein ist es ja logisch...