目的
为implicit instantiation of undefined template 类型提供问题思路参考。
我是受到参考博客 这篇博客思路, 说是增加
#include <QObject>
此问题就解决了。
其实不然, 这篇虽然解决了, 但是根本问题不是这,他自定义的两个类都没有继承自QObject , implicit instantiation of undefined template QList<> , 其核心在于 undefined template , 未定义的说明找不到, 在头文件出一定要
include 对应的 template 结构。包括QList, 以及它包含的对象。 因为QList, QVector 它们都是模板类, 需要具体实例化才能使用。