从QML文件调用函数

从QML文件调用函数

问题描述:

我想调用c ++函数writeintocsvFile()将数据写入/附加到QML的CSV文件中。如果有人指导我如何做到这一点会很好吗?



我尝试过:



从QML调用函数的方法

I want to call c++ function "writeintocsvFile()" to write/append data into CSV file from QML. Would be nice if someone guide me how i can do this??

What I have tried:

method to call function from QML

检查这个似乎有类似问题答案的帖子。

[已解决]从C ++调用函数QML | Qt论坛 [ ^ ]



此外,请查看以下文章 -

集成QML和C ++ Qt QML 5.7 [ ^ ]



希望,它有帮助:)
Check this thread which seems to have a answer for a similar question.
[solved] To call function in C++ from QML | Qt Forum[^]

Also, check following article-
Integrating QML and C++ | Qt QML 5.7[^]

Hope, it helps :)