本文主要是介绍Qt中报错error: allocation of incomplete type QLabel,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
就是按照书上的源码来的,
但是这个因为qt4到qt5的一个变化
在Qt官网wiki找到了答案:http://qt-project.org/wiki/Transition_from_Qt_4.x_to_Qt5
解决:
Change all instances of
#include <QtGui>
to
#include <QtWidgets>
这篇关于Qt中报错error: allocation of incomplete type QLabel的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!