Here is the the thing, I have a header file with a list of defines, defining string constants. I'm doing my interface with QML. I was wondering if there is any way to import those defines so that I can reference from QML.
Asked
Active
Viewed 485 times
2
-
1Don't think it's possible to export macro defines to `QML`. it's processed in the preprocessor...Why not use `readonly` property for the constants. – JustWe Jun 01 '18 at 00:41
-
https://stackoverflow.com/a/50281612/904422 – Mitch Jun 01 '18 at 08:27
-
This may help https://stackoverflow.com/questions/20089196/how-to-access-c-enum-from-qml – ephemerr Jun 01 '18 at 11:19