学习Qt,有一行代码报错:
QTextBlock textLine=doc->findBlockByNumber(i);
报错内容为:
error: calling 'findBlockByNumber' with incomplete return type 'QTextBlock‘
error: variable has incomplete type 'QTextBlock'
解决方法是,在项目头文件中,添加相应的头文件包含,在本题中是
#include <QTextBlock>