I understand what you mean. But I have questions:
1) Where do I have to put this part? Every file? Just in the class file? Somewhere else?Qt Code:
#ifdef qApp #undef qApp #endif #define qApp static_cast<MyApp*>(QCoreApplication::instance())To copy to clipboard, switch view to plain text mode
2) With that code I have to include some classes I use (the part above my main function in main.cpp)?
3) Do I have to instantiate the class in all files or just in the main function? Or does it work in another way?
4) Can I put the delete lines (now at the bottom of my main function in main.cpp) in the destructor of the class?
Bookmarks