qt conversion from int64_t to qvariant is ambiguous - Solution (에러 해결 방법)
qt conversion from int64_t to qvariant is ambiguous
- Solution (에러 해결 방법)
(추천) Qt QML과 C++로 시작하는 크로스플랫폼 앱 개발 강의 - 입문편
Qt QML과 C++로 시작하는 크로스플랫폼 앱 개발 - 입문편 강의 - 인프런
Qt QML과 C++를 사용하여 크로스플랫폼 애플리케이션 개발에 입문할 수 있습니다. 해당 강의에서는 윈도우 응용 프로그램 타겟으로 개발을 진행합니다., 강의 주제 📖 이 강의를 통해 참가자들은
www.inflearn.com
qt conversion from int64_t to qvariant is ambiguous
윈도우/맥 환경에서 잘 빌드되던 Qt프로젝트가 리눅스 환경에서 위 에러 메시지와 함께 간혹 빌드 실패할 때가 있다.
이럴 때는 소스 코드 내의 datetime 등의 int64_t로 선언된 변수에 대해 특별한 처리가 필요하다.
아래와 같이 해당 변수에 대해 QVariant::fromValue()로 한번 감싸면 된다.
(Qt project, which was built well in Windows/Mac environment, sometimes fails to build with the above error message in Linux environment.
In this case, special handling is required for variables declared as int64_t such as datetime in the source code.
Just wrap it once with QVariant::fromValue() for the variable as shown below.)
QVariant::fromValue(int64_t variable);
(추천) Qt QML과 C++로 시작하는 크로스플랫폼 앱 개발 강의 - 입문편
Qt QML과 C++로 시작하는 크로스플랫폼 앱 개발 - 입문편 강의 - 인프런
Qt QML과 C++를 사용하여 크로스플랫폼 애플리케이션 개발에 입문할 수 있습니다. 해당 강의에서는 윈도우 응용 프로그램 타겟으로 개발을 진행합니다., 강의 주제 📖 이 강의를 통해 참가자들은
www.inflearn.com