PDA

View Full Version : C++ - Qt 5.11.2 - Problem with complex numbers and later Qt version [solved]



jimbo
11th October 2018, 14:13
Hello,

Qt about:-
Qt Creator 4.7.1
Based on Qt 5.11.2 (MSVC 2015, 32 bit)

Compiler
C:\Qt\Tools\mingw530_32\bin\g++.exe

I'm getting these errors when loading an old project into Qt Creator.
It did compile with an earlier version of Qt.
Can somebody enlighten me?

Regards


no member named 'real' in 'std::complex<double>'
no member named 'imag' in 'std::complex<double>'
QPointF divide::findLineEndPoint( double startX, double startY,
double length, double angle ) //radians
{
auto endPoint = ( std::complex<double> ( startX, startY )
+ std::polar<double> ( length, angle ) );

return ( QPointF ( endPoint.real(), endPoint.imag() ) );
}

It was a problem with the 'kits' being mixed up.