What you are seeing is a forward declaration. Like the poster above me mentioned, since the header only references the class, you only need to include the "class QList". However, you will notice that when the class is actually used (in the .cpp file for example, the #include <QList> must be included. People do this because it reduces compile times since you no longer need to include the header of a forward declared class in that files, only the file where the class (QList) is actually used. While not a big deal on pet projects, if you ever develop for a commercial entity, you're talking about serious time saved.
Bookmarks