variable has incomplete type 'QVariant'

It’s really strange that Qt reports errors. I thought it could be used directly without including the QVariant header file. Using the QVariant keyword without including the header file will not report an error, but it will report an error when running.

The solution to this error can be used by including the QVariant header file.

And the error reported is very strange, the missing header file is not reported directly. Report various internal errors. Have been looking for me for a long time. . .

Guess you like

Origin blog.csdn.net/weixin_39139505/article/details/103064762