3 ms·
QObject is not a base class for everything like in those codebases GP probably thinks about. It's a base class for a very specific set of functionality that can
by majewsky 6y ago
QObject is not a base class for everything like in those codebases GP probably thinks about. It's a base class for a very specific set of functionality that can be very roughly summarized as "the thing wants to participate in the signal-slot communication scheme". For example, QFile is a QObject because it has ready-to-read signals etc.
But there are also tons of classes in Qt that are not QObject, esp. all the value classes like QList or QPoint or QString.
If anything, the biggest sin of QObject might be its name. If it had been named QActor or something like that, people wouldn't mind that much.