QT uses MSVC compiler, and the code reports an error
1. Premise
After inspection, it is confirmed that your code is correct, and the error reported by QT creator is a pure false alarm.
2. Error examples
[error] Constants with newlines
[error] xxx is not a member of xxx
[error] Syntax error, missing ;
...
3. Solutions
Add the following configuration in *.Pro file.
win32-msvc*: {
QMAKE_CFLAGS *= /utf-8
QMAKE_CXXFLAGS *= /utf-8
}
Read More:
- [Chrome]: DevTools failed to load source map… (How to Solve)
- How to Solve Vue cli syntax Close Error
- Vue: How to Solve error avoided redundant navigation to current location: “/xxx”
- How to Solve Vue loading 3D model Error
- Vue: How to Solve Eslint error
- How to Solve Converting circular structure to JSON‘ Error
- How to Solve Error: [Vue warn]: Missing required prop: “value”
- How to Solve electron import page Error
- VUE: How to Solve NPM Always Install Error
- How to Solve npm-install Command -4048 Error
- React: How to Solve Web3 import error
- How to Solve Vue cli configuration SCSS global variable error
- How to Solve “Vue is not defined” Error
- How to Solve Vite package error
- How to Solve VUE Error: Mixed spaces and tabs
- Json.parse: All Error & How to Solve Them
- How to Solve Vue-devtool Package Error
- React error boundary (What You Should Know & How to Solve)
- How to Solve Vue3 using deep syntax Error
- How to Solve Webpack packag iconfont font error