Math functions/constants in QML code: i.e. M_PI or sin/cos/tg
Unsolved
QML and Qt Quick
-
Hello,
I am trying to use math functions and constants within my QML code but I am getting an error:
ReferenceError: M_PI is not defined.
I included the #include <QtMath> into main.cpp but it looks like is not enough to see the functions in my QML code.
How do I include it in QML ?
thx -
Hello,
I am trying to use math functions and constants within my QML code but I am getting an error:
ReferenceError: M_PI is not defined.
I included the #include <QtMath> into main.cpp but it looks like is not enough to see the functions in my QML code.
How do I include it in QML ?
thx -
@J.Hilk said in Math functions/constants in QML code: i.e. M_PI or sin/cos/tg:
Math
So I need to pre-pend Math. to any Math function I use like sqrt/sin/cos/tan, any link?
thx!