1

I downloaded Qt6.1.2, I installed the Qt tools extension in visual studio 2019 and I added the version its path. Whenever I start a new Qt widgets application project I get a lot of errors like this one:

abc Error (active) E2783 expected a comma (the one-argument version of static_assert is not enabled in this mode) Project_Name C:\Qt\6.1.2\msvc2019_64\include\QtCore\qanystringview.h
or this one

abc Error (active) E0325 inline specifier allowed on function declarations only Project_Name C:\Qt\6.1.2\msvc2019_64\include\QtGui\qrgb.h

And for the records the Qt creator works just fine but I need to write code on visual studio.

drescherjm
  • 10,365
  • 5
  • 44
  • 64
Khaled
  • 11
  • 3

1 Answers1

1

I had the same error, and going to the solution explorer and right clicking properties->General, and changing the C++ Language Standard to C++ 17 (it was C++ 14) fixed the errors.

I learned this from the YouTube video posted by Alex Toma: https://www.youtube.com/watch?v=heiyPLJLBS8

So the credit goes to Alex - thanks!